You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Hemika Kodikara <he...@gmail.com> on 2016/01/25 06:39:53 UTC

MQTT JMeter Sampler

Hi All,

I have implemented a JMeter sampler for the MQTT protocol. I have sent
github pull request[1] for the implementation.

Prior to this pull request I have created the plugin separately which is
available at [2].

I would also like to inform that the [2] repository was forked from [3]
initially and then refactored to use eclipse paho client along with several
other modifications. [3] repository uses an Apache License.

Following are several notes regarding the sampler :
1. The sample uses the eclipse paho mqtt client 1.0.2 which is available at
[4].
2. In MQTT, a client ID is necessary for each client. If the client ID is
kept empty, a client ID will get automatically generated in this sampler.
The reason for doing this is that when the thread count is more than 1,
there will be several clients with the same client ID. This will throw an
exception. Therefore if the client id field is kept empty, client IDs will
get generated.
3. MQTT has a client side persistence store as well. According to the
implementation, the sampler uses the MqttDefaultFilePerisistance[5] which
is targeted to the tmp folder of the OS.
4. "Last Will and Testament" feature is not supported as of now.
5. Publishing or subscribing to multiple topic with the same connection is
not supported as of now.
6. Tested the sampler against WSO2 Message Broker 3.0.0.

Your comments are welcomed on this matter.

[1] - https://github.com/apache/jmeter/pull/72
[2] - https://github.com/hemikak/mqtt-jmeter
[3] - https://github.com/tuanhiep/mqtt-jmeter
[4] -
https://repo.eclipse.org/content/repositories/paho-releases/org/eclipse/paho/org.eclipse.paho.client.mqttv3/1.0.2/
[5] -
https://www.eclipse.org/paho/files/javadoc/org/eclipse/paho/client/mqttv3/persist/MqttDefaultFilePersistence.html
[6] -
http://www.hivemq.com/blog/mqtt-essentials-part-9-last-will-and-testament

Regards,
Hemika