emqx / mqtt-jmeter

MQTT JMeter Plugin
https://www.emqx.com/en
Apache License 2.0
445 stars 194 forks source link

Jmeter not receiving message from MQTT #97

Open karthiklingasamy opened 3 years ago

karthiklingasamy commented 3 years ago

Hi Team,

Jmeter (V5.4.1) not receiving MQTT message when the below exception occurs. Please help xmeter JAR : mqtt-xmeter-2.0.2-jar-with-dependencies.jar Test Scenario: 100 Messages published on Topic. But jmeter subscriber only received 3 message remaining 97 messages not received. But when i check MQTT box all messages received Capture

2021-01-29 11:14:14,937 ERROR o.a.j.JMeter: Uncaught exception in thread Thread[RxComputationThreadPool-2,5,main] java.lang.IllegalStateException: Current state = RESET, new state = FLUSHED at java.nio.charset.CharsetDecoder.throwIllegalStateException(Unknown Source) ~[?:1.8.0_241] at java.nio.charset.CharsetDecoder.flush(Unknown Source) ~[?:1.8.0_241] at java.nio.charset.CharsetDecoder.decode(Unknown Source) ~[?:1.8.0_241] at net.xmeter.samplers.mqtt.hivemq.HiveMQTTConnection.decode(HiveMQTTConnection.java:115) ~[mqtt-xmeter-2.0.2-jar-with-dependencies.jar:?] at java.util.Optional.map(Unknown Source) ~[?:1.8.0_241] at net.xmeter.samplers.mqtt.hivemq.HiveMQTTConnection.handlePublishReceived(HiveMQTTConnection.java:109) ~[mqtt-xmeter-2.0.2-jar-with-dependencies.jar:?] at com.hivemq.client.internal.mqtt.mqtt3.Mqtt3AsyncClientView.lambda$callbackView$1(Mqtt3AsyncClientView.java:73) ~[mqtt-xmeter-2.0.2-jar-with-dependencies.jar:?] at com.hivemq.client.internal.mqtt.MqttAsyncClient$CallbackSubscriber.onNext(MqttAsyncClient.java:227) ~[mqtt-xmeter-2.0.2-jar-with-dependencies.jar:?] at com.hivemq.client.internal.mqtt.MqttAsyncClient$CallbackSubscriber.onNext(MqttAsyncClient.java:212) ~[mqtt-xmeter-2.0.2-jar-with-dependencies.jar:?] at com.hivemq.client.rx.FlowableWithSingle$SingleFutureSubscriber.onNext(FlowableWithSingle.java:377) ~[mqtt-xmeter-2.0.2-jar-with-dependencies.jar:?] at com.hivemq.client.internal.rx.operators.FlowableWithSingleCombine$SplitSubscriber$Default.tryOnNextActual(FlowableWithSingleCombine.java:206) ~[mqtt-xmeter-2.0.2-jar-with-dependencies.jar:?] at com.hivemq.client.internal.rx.operators.FlowableWithSingleCombine$SplitSubscriber.tryOnNext(FlowableWithSingleCombine.java:171) ~[mqtt-xmeter-2.0.2-jar-with-dependencies.jar:?] at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnConditionalSubscriber.runAsync(FlowableObserveOn.java:649) ~[mqtt-xmeter-2.0.2-jar-with-dependencies.jar:?] at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176) ~[mqtt-xmeter-2.0.2-jar-with-dependencies.jar:?] at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66) [mqtt-xmeter-2.0.2-jar-with-dependencies.jar:?] at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57) [mqtt-xmeter-2.0.2-jar-with-dependencies.jar:?] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_241] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [?:1.8.0_241] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:1.8.0_241] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_241] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_241] at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]

ramanth-gajula commented 3 years ago

+1 facing exactly same issue with jmeter v5.4.1. @karthiklingasamy can you please let me know if you have found the root cause or any way to solve this

QAInsights commented 3 years ago

@karthiklingasamy Please check the increase the elapsed seconds in the subscriber. image

karthiklingasamy commented 3 years ago

Hi Naveen I am using the option "number of received messages=1" instead of "specified elapsed time". Objective is to publish 5K messages and receive 5K messages. jmeter/xmeter is able to publish 5k messages without any issue put on receive/subscriber side only receive 15 messages. Based on my analysis after receive the exception highlighted in the screen shot jmeter/xmeter stop receiving the subsequent messages. But when i analysis the application log all 5k messages are received. So client says jmter/xmeter is not working properly. Please help image

shicy122 commented 1 year ago

+1 facing exactly same issue with jmeter v5.5. @karthiklingasamy can you please let me know if you have found the root cause or any way to solve this

greenhand88 commented 1 year ago

I meet the same question with jmeter v5.5, it occures frequently.

ShaneMill1 commented 11 months ago

If anyone is coming across this issue, I solved it by building the jar from source via maven instead of using the jar referenced on the release page. Once I built from source, I no longer had this issue.

It appears it may have been fixed in this PR: https://github.com/emqx/mqtt-jmeter/pull/127