mqtt-jmeter icon indicating copy to clipboard operation
mqtt-jmeter copied to clipboard

need callback functionality

Open Hmm90 opened this issue 7 years ago • 6 comments

Hello is it possible to add/implemente to usage of callbacks?

Like descripted in.

Using the Callback/Continuation Passing based API https://github.com/fusesource/mqtt-client

Thx

Hmm90 avatar Mar 14 '18 10:03 Hmm90

Or better need the possibility to see to content of the callback message

Hmm90 avatar Mar 14 '18 11:03 Hmm90

@Hmm90 Actually in the "separate_conn" branch of this project, we already applied the "callback" flavor APIs across connect/pub/sub sampler. With SubSampler, you can still get the messages based on either "time interval" or "count of messages".

Please give it a try at https://github.com/emqtt/mqtt-jmeter/releases/tag/v1.0.1

If this is not what you're looking for, please give us more details on your thoughts. Thanks!

rende2005 avatar Mar 15 '18 00:03 rende2005

during MQTT Connect the client is getting a callback with a uuid. Actual it is not possible to see that uuid as callback message.

Hmm90 avatar Mar 16 '18 09:03 Hmm90

  1. When connecting, sampler can specify a clientId, a random suffix can be generated if you will (to distinguish each connecting client).
  2. When CallbackConnection instance is created, it's a unique object instance, you can see sampler response message like this: "Connection org.fusesource.mqtt.client.CallbackConnection@70612f5d".

Not clear on the "uuid" concept you mentioned. Where did you see it, and what is your usage scenario?

rende2005 avatar Mar 16 '18 11:03 rende2005

I need the payload of the callnack message mqttMessage.getpayload() (org.eclipse.paho.client.mqttv3.MqttMessage)

in my case the payload contains a uuid.

Hmm90 avatar Mar 21 '18 10:03 Hmm90

We don't expect a callback message during the ordinary mqtt connection setup process.
If this is your specific scenario, feel free to extend the plugin code on your own.

rende2005 avatar Mar 21 '18 12:03 rende2005