MQTT Server/MQTT Broker - Scalable Distributed MQTT Message Broker for IoT in the 5G Era
English | 简体中文
RMQTT broker is a fully open source, highly scalable, highly available distributed MQTT messaging broker for IoT, M2M and mobile applications that can handle millions of concurrent clients on a single service node.
100% Rust safe code;
MQTT v3.1, v3.1.1 and v5.0 protocols support;
Distributed cluster;
Hooks;
TLS support;
WebSocket support;
WebSocket-TLS support;
Shared subscription($share/{group}/topic);
Built-in extensible components;
Extensible plug-in support;
Metrics & Stats;
Rate limit;
Inflight and Queue;
Message resending;
For full list of new features, please read RMQTT Release Notes.
The RMQTT broker is cross-platform, which supports Linux, Unix, macOS and Windows. It means RMQTT can be deployed on x86_64 architecture servers and ARM devices like Raspberry Pi.
mkdir -p /app/log/rmqtt
docker run -d --name rmqtt -p 1883:1883 -p 8883:8883 -p 11883:11883 -p 6060:6060 -v /app/log/rmqtt:/var/log/rmqtt rmqtt/rmqtt:latest
docker run -d --name rmqtt1 -p 1884:1883 -p 8884:8883 -p 11884:11883 -p 6064:6060 -v /app/log/rmqtt/1:/var/log/rmqtt rmqtt/rmqtt:latest --id 1 --plugins-default-startups "rmqtt-cluster-raft" --node-grpc-addrs "[email protected]:5363" "[email protected]:5363" "[email protected]:5363" --raft-peer-addrs "[email protected]:6003" "[email protected]:6003" "[email protected]:6003"
docker run -d --name rmqtt2 -p 1885:1883 -p 8885:8883 -p 11885:11883 -p 6065:6060 -v /app/log/rmqtt/2:/var/log/rmqtt rmqtt/rmqtt:latest --id 2 --plugins-default-startups "rmqtt-cluster-raft" --node-grpc-addrs "[email protected]:5363" "[email protected]:5363" "[email protected]:5363" --raft-peer-addrs "[email protected]:6003" "[email protected]:6003" "[email protected]:6003"
docker run -d --name rmqtt3 -p 1886:1883 -p 8886:8883 -p 11886:11883 -p 6066:6060 -v /app/log/rmqtt/3:/var/log/rmqtt rmqtt/rmqtt:latest --id 3 --plugins-default-startups "rmqtt-cluster-raft" --node-grpc-addrs "[email protected]:5363" "[email protected]:5363" "[email protected]:5363" --raft-peer-addrs "[email protected]:6003" "[email protected]:6003" "[email protected]:6003"
Node IDs: 1, 2, 3; Node IP Addrs: 172.17.0.3, 172.17.0.4, 172.17.0.5
Start docker-compose cluster
docker-compose up -d
curl "http://127.0.0.1:6066/api/v1/health/check"
Get the binary package of the corresponding OS from RMQTT Download page.
rmqtt-acl.toml
configuration and add the following line at the first line: ["deny", "all", "subscribe", ["test/nosubscribe"]],rmqtt.toml
configuration and change max_keepalive
to 60.rmqtt-acl.toml
configuration and add the following line at the first line: ["deny", "all", "subscribe", ["test/nosubscribe"]],
Modify the test_subscribe_failure()
method in client_test5.py
by changing 0x80
to 0x87
.
Because rmqtt
returns the error code 0x87, while test_subscribe_failure
expects it to return 0x80.
UnspecifiedError = 0x80, NotAuthorized = 0x87。Item | Content | |
---|---|---|
System | x86_64 GNU/Linux | Rocky Linux 9.2 (Blue Onyx) |
CPU | Intel(R) Xeon(R) CPU E5-2696 v3 @ 2.30GHz | 72(CPU(s)) = 18(Core(s)) * 2(Thread(s) per core) * 2(Socket(s)) |
Memory | DDR3/2333 | 128G |
Disk | 2T | |
Container | podman | v4.4.1 |
MQTT Bench | docker.io/rmqtt/rmqtt-bench:latest | v0.1.3 |
MQTT Broker | docker.io/rmqtt/rmqtt:latest | v0.3.0 |
Other | MQTT Bench and MQTT Broker coexistence |
Item | Single Node | Raft Cluster Mode |
---|---|---|
Total Concurrent Clients | 1,000,000 | 1,000,000 |
Connection Handshake Rate | (5500-7000)/second | (5000-7000)/second |
Item | Single Node | Raft Cluster Mode |
---|---|---|
Subscription Client Count | 1,000,000 | 1,000,000 |
Publishing Client Count | 40 | 40 |
Message Throughput Rate | 150,000/second | 156,000/second |
For detailed benchmark test results and information, see documentation.