Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/freenowtech/mqtt-loadtest
A loadtest for MQTT brokers
https://github.com/freenowtech/mqtt-loadtest
hivemq loadtest mosquitto-mqtt-broker mqtt rabbitmq rocketmq vernemq
Last synced: 10 days ago
JSON representation
A loadtest for MQTT brokers
- Host: GitHub
- URL: https://github.com/freenowtech/mqtt-loadtest
- Owner: freenowtech
- License: apache-2.0
- Created: 2019-11-01T14:27:55.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-14T13:04:13.000Z (almost 4 years ago)
- Last Synced: 2024-06-19T04:16:20.133Z (6 months ago)
- Topics: hivemq, loadtest, mosquitto-mqtt-broker, mqtt, rabbitmq, rocketmq, vernemq
- Language: Go
- Size: 37.1 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
MQTT-loadtest
=============Capable of creating high amounts of subscribers, publishers and messages to loadtest a MQTT broker.
Features
--------- Prometheus metrics
- Churning (Reconnecting)
- High amount of subs/pubs possible
- Low memory usage
- MQTT 3, 4(3.1.1), 5
- QoS typesDeployment
----------To run a proper loadtest on a MQTT broker you need to run the subscribe as well as the publish command. These can be run in different manners. The publish command will create a specified amount of publishers and post messages into certain topics.
```bash
mqtt-loadtest publish --topic-prefix loadtest --topic-count 100 --publisher-prefix loadtest-publisher --publisher-count 1 --url 127.0.0.1:1883 --connect-delay 1s --listen-address :8081 --prometheus-enabled --prometheus-path /metrics --log-level debug --clean-session --protocol-version 4 --qos-type 0 --message-rate 40ms
```The subscribe command will create a specified amount of subscribers and receive messages out of certain topics.
```bash
mqtt-loadtest subscribe --topic-prefix loadtest --topic-count 100 --subscriber-prefix loadtest-subscriber --subscriber-count 1 --url 127.0.0.1:1883 --connect-delay 1s --listen-address :8081 --prometheus-enabled --prometheus-path /metrics --log-level debug --clean-session --protocol-version 4 --churn-rate 1s
```### Local
Download the binary from the release page or [build](#build-from-source) it from source and execute it with the subscriber and publisher command. For usage information refer to the commands help text.
### Docker
You can run the containers directly or through docker-compose.
```bash
docker run freenow/mqtt-loadtest:latest subscribe --url mqtt_cluster:1883
``````bash
docker run freenow/mqtt-loadtest:latest publish --url mqtt_cluster:1883
```Development
-----------### Build from source
You can build the binary either with [Go](https://golang.org/) installed locally or in [Docker](https://www.docker.com/). For Go in Docker execute `make build_linux` or `make build_darwin` and for local Go `make build_local`.