takanorig / mqtt-bench

Benchmark tool for MQTT Broker
144 stars 67 forks source link

No respond for sub #3

Open husnulhamidiah opened 8 years ago

husnulhamidiah commented 8 years ago

I am running mosquitto broker on my ubuntu server. When I test it with this command

sudo ./mqtt-bench -broker=tcp://127.0.0.1:1883 -action=subcount=50 -intervaltime=10

It show only this this message and no summary. I checked my broker, it's fine.

2016-05-12 07:46:10.338469193 +0700 WIB Start benchmark

But when i do the same test for pub. Everything goes fine.

sudo ./mqtt-bench -broker=tcp://127.0.0.1:1883 -action=pub -count=50 -intervaltime=10
2016-05-12 07:52:06.890018967 +0700 WIB Start benchmark
2016-05-12 07:52:07.406071964 +0700 WIB End benchmark

Result : broker=tcp://127.0.0.1:1883, clients=10, totalCount=494, duration=515ms, throughput=959.22messages/sec
takanorig commented 8 years ago

If you want to do "subscribe" mode, you have to do "publish" mode with another process.

e.g) $ mqtt-bench -broker=tcp://192.168.1.100:1883 -action=pub -count=10000 ->Start "pub" with enough "count" before "sub"

$ mqtt-bench -broker=tcp://192.168.1.100:1883 -action=sub ->Start "sub"