Skip to content
Load testing tool to stress MQTT message broker
Branch: master
Clone or download
arnisoph release v3
Signed-off-by: Arnold Bechtoldt <arnold.bechtoldt@inovex.de>
Latest commit 8d363b7 Nov 17, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
vendor
.gitignore Initial commit Apr 11, 2017
.travis.yml
Dockerfile Fixed Dockerfile Oct 1, 2018
Gopkg.lock Update paho.mqtt.golang to version 1.1.1 Oct 1, 2018
Gopkg.toml Update paho.mqtt.golang to version 1.1.1 Oct 1, 2018
LICENSE add initial files Apr 11, 2017
Makefile Merge pull request #16 from hikhvar/update-paho.mqtt.golang Oct 5, 2018
README.md Update README.md Oct 11, 2018
VERSION release v3 Nov 16, 2018
main.go Print parsing errors always to STDERR Nov 1, 2018
report.go Merge pull request #17 from hikhvar/improve-resilience Oct 11, 2018
vendor.conf add initial files Apr 11, 2017
worker.go Add basic support for publisher and subscriber QoS and retain value Nov 1, 2018

README.md

MQTT Stresser

Load testing tool to stress MQTT message broker

Build

$ mkdir -p ${GOPATH}/src/github.com/inovex/
$ git clone https://github.com/inovex/mqtt-stresser.git ${GOPATH}/src/github.com/inovex/mqtt-stresser/
$ cd ${GOPATH}/src/github.com/inovex/mqtt-stresser/
$ make

This will build the mqtt stresser for all target platforms and write them to the build/ directory.

Binaries are provided on Github, see https://github.com/inovex/mqtt-stresser.

If you want to build the Docker container version of this, go to repository directory and simply type docker build .

Install

Place the binary somewhere in a PATH directory and make it executable (chmod +x mqtt-stresser).

If you are using the container version, just type docker run flaviostutz/mqtt-stresser [options] for running mqtt-stresser.

Configure

See mqtt-stresser -h for a list of available arguments.

Run

Simple hello-world test using the public broker.mqttdashboard.com broker: (please don't DDoS them :))

$ mqtt-stresser -broker tcp://broker.mqttdashboard.com:1883 -num-clients 100 -num-messages 150 -rampup-delay 1s -rampup-size 10 -global-timeout 180s -timeout 20s

10 worker started - waiting 1s
20 worker started - waiting 1s
30 worker started - waiting 1s
40 worker started - waiting 1s
50 worker started - waiting 1s
60 worker started - waiting 1s
70 worker started - waiting 1s
80 worker started - waiting 1s
90 worker started - waiting 1s
100 worker started
....................................................................................................
# Configuration
Concurrent Clients: 100
Messages / Client:  15000

# Results
Published Messages: 15000 (100%)
Received Messages:  15000 (100%)
Completed:          100 (100%)
Errors:             0 (0%)

# Publishing Throughput
Fastest: 79452 msg/sec
Slowest: 14991 msg/sec
Median: 42093 msg/sec

  < 21437 msg/sec  6%
  < 27883 msg/sec  21%
  < 34329 msg/sec  33%
  < 40776 msg/sec  48%
  < 47222 msg/sec  57%
  < 53668 msg/sec  65%
  < 60114 msg/sec  73%
  < 66560 msg/sec  85%
  < 73006 msg/sec  95%
  < 79452 msg/sec  99%
  < 85898 msg/sec  100%

# Receiving Througput
Fastest: 4102 msg/sec
Slowest: 65 msg/sec
Median: 1919 msg/sec

  < 469 msg/sec  33%
  < 1276 msg/sec  34%
  < 1680 msg/sec  38%
  < 2083 msg/sec  62%
  < 2487 msg/sec  85%
  < 2891 msg/sec  93%
  < 3295 msg/sec  98%
  < 4102 msg/sec  99%
  < 4506 msg/sec  100%

If using container,

$ docker run inovex/mqtt-stresser -broker tcp://broker.mqttdashboard.com:1883 -num-clients 100 -num-messages 10 -rampup-delay 1s -rampup-size 10 -global-timeout 180s -timeout 20s
You can’t perform that action at this time.