Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

rmqtt

> 编程语言
Open source

MQTT Server/MQTT Broker - Scalable Distributed MQTT Message Broker for IoT in the 5G Era

979 stars0 likes0 views
WebsiteGitHub

About

MQTT Server/MQTT Broker - Scalable Distributed MQTT Message Broker for IoT in the 5G Era

RMQTT Broker

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.

Features

  • 100% Rust safe code;

  • Based on tokio;

  • MQTT v3.1, v3.1.1 and v5.0 protocols support;

    • QoS0, QoS1, QoS2 message support;
    • Offline message support;
    • Retained message support;
    • Last Will message support;
  • Distributed cluster;

  • Built-in AUTH/ACL;

  • HTTP AUTH/ACL;

  • JWT AUTH/ACL;

  • WebHook;

  • HTTP APIs;

  • $SYS System Topics;

  • Store session information;

  • Store unexpired messages;

  • MQTT Bridging - Ingress Mode;

  • MQTT Bridging - Egress Mode;

  • Apache Kafka Bridging - Ingress Mode;

  • Apache Kafka Bridging - Egress Mode;

  • Apache Pulsar Bridging - Ingress Mode;

  • Apache Pulsar Bridging - Egress Mode;

  • NATS Bridging - Ingress Mode;

  • NATS Bridging - Egress Mode;

  • Reductstore Bridging - Egress Mode;

  • Topic Rewrite;

  • Auto Subscription;

  • P2P Messaging;

  • Shared subscription($share/{Group}/{TopicFilter});

  • Exclusive subscription($exclusive/{TopicFilter});

  • Limit subscription($limit/{LimitQuantity}/{TopicFilter});

  • Delayed publish($delayed/{DelayInterval}/{TopicName});

  • Hooks;

  • TLS support;

  • WebSocket support;

  • WebSocket-TLS support;

  • MQTT over QUIC support;

  • 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.

Installation

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.

Run RMQTT using Docker

  • Single node
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
  • Multi node
…

Node IDs: 1, 2, 3; Node IP Addrs: 172.17.0.3, 172.17.0.4, 172.17.0.5

Create a single node by docker-compose

# docker-compose.yaml
version: '3'

services:
  rmqtt:
    container_name: rmqtt
    image: rmqtt/rmqtt:latest
    volumes:
      - /etc/localtime:/etc/localtime
      - /app/rmqtt-single/etc/:/app/rmqtt/etc
      - /app/rmqtt-single/log:/var/log/rmqtt
    ports:
      - "1883:1883"
      - "8080:8080"
      - "8883:8883"
      - "11883:11883"
      - "6060:6060"
    restart: always
    command: -f ./etc/rmqtt.toml --id 1
    privileged: true

Create a static cluster by docker-compose

  1. Download docker-compose configuration template

  2. Start docker-compose cluster

docker-compose up -d
  1. View cluster
curl "http://127.0.0.1:6066/api/v1/health/check"

Installing via ZIP Binary Package (Linux、MacOS、Windows)

Get the binary package of the corresponding OS from RMQTT Download page.

  • Single Node Install

  • Multi Node Install

Library Mode Integration

In addition to running as a standalone MQTT Broker/Server, rmqtt also provides a Library Mode, which allows you to embed rmqtt directly into your Rust applications or services. Simply add the following dependency to your Cargo.toml, and you can use rmqtt's APIs just like a regular Rust library:

[dependencies]
rmqtt = "0.21"

For more details about using rmqtt in library mode, please refer to the RMQTT Library Documentation.

Plugin System

RMQTT has 26 built-in plugins across 6 categories:

Category Plugins
Auth ACL, HTTP Auth, JWT Auth
Storage Retainer, Message Store, Session Store
Cluster Raft, Broadcast
Bridge MQTT (in/out), Kafka (in/out), Pulsar (in/out), NATS (in/out), ReductStore (out), Bridge Origin
API HTTP API, WebHook, Sys Topic
Utility Counter, Auto Subscription, Topic Rewrite, P2P Messaging, Shared Subscription

Plugin Development Guide →

Documentation

Resource Description
Architecture Overview System architecture, module design, data flow
Configuration Guide All configuration options with defaults
HTTP API Reference 36 REST API endpoints
Contributing Guide How to contribute code
Changelog Release history
Developer Guide Build, test, development workflow
Testing Guide Unit tests, integration tests, interoperability
Sub-crate docs rmqtt, rmqtt-bin, rmqtt-codec, rmqtt-net, rmqtt-conf, rmqtt-utils, rmqtt-macros, rmqtt-test

Test

Interoperability Testing

paho.mqtt.testing(MQTT V3.1.1) client_test.py

  • client_test.py Test.test_retained_messages [OK]
  • client_test.py Test.test_zero_length_clientid [OK]
  • client_test.py Test.will_message_test [OK]
  • client_test.py Test.test_offline_message_queueing [OK]
  • client_test.py Test.test_overlapping_subscriptions [OK]
  • client_test.py Test.test_keepalive [OK]
  • client_test.py Test.test_redelivery_on_reconnect [OK]
  • client_test.py Test.test_dollar_topics [OK]
  • client_test.py Test.test_unsubscribe [OK]
  • client_test.py Test.test_subscribe_failure [OK]
    • You need to modify the rmqtt-acl.toml configuration and add the following line at the first line: ["deny", "all", "subscribe", ["test/nosubscribe"]]

paho.mqtt.testing(MQTT V5.0) client_test5.py

  • client_test5.py Test.test_retained_message [OK]
  • client_test5.py Test.test_will_message [OK]
  • client_test5.py Test.test_offline_message_queueing [OK]
  • client_test5.py Test.test_dollar_topics [OK]
  • client_test5.py Test.test_unsubscribe [OK]
  • client_test5.py Test.test_session_expiry [OK]
  • client_test5.py Test.test_shared_subscriptions [OK]
  • client_test5.py Test.test_basic [OK]
  • client_test5.py Test.test_overlapping_subscriptions [OK]
  • client_test5.py Test.test_redelivery_on_reconnect [OK]
  • client_test5.py Test.test_payload_format [OK]
  • client_test5.py Test.test_publication_expiry [OK]
  • client_test5.py Test.test_subscribe_options [OK]
  • client_test5.py Test.test_assigned_clientid [OK]
  • client_test5.py Test.test_subscribe_identifiers [OK]
  • client_test5.py Test.test_request_response [OK]
  • client_test5.py Test.test_server_topic_alias [OK]
  • client_test5.py Test.test_client_topic_alias [OK]
  • client_test5.py Test.test_maximum_packet_size [OK]
  • client_test5.py Test.test_keepalive [OK]
  • client_test5.py Test.test_zero_length_clientid [OK]
  • client_test5.py Test.test_user_properties [OK]
  • client_test5.py Test.test_flow_control2 [OK]
  • client_test5.py Test.test_flow_control1 [OK]
  • client_test5.py Test.test_will_delay [OK]
  • client_test5.py Test.test_server_keep_alive [OK]
    • You need to modify the rmqtt.toml configuration and change max_keepalive to 60.
  • client_test5.py Test.test_subscribe_failure [OK]
    • You need to modify the rmqtt-acl.toml configuration and add the following line at the first line: ["deny", "all", "subscribe", ["test/nosubscribe"]]

Integration Test Harness

The rmqtt-test crate provides a custom test harness with functional, stress, and chaos suites beyond paho. See Test Report for details.

Benchmark

Environment

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

Connection Concurrency Performance

Item Single Node Raft Cluster Mode
Total Concurrent Clients 1,000,000 1,000,000
Connection Handshake Rate (5500-7000)/second (5000-7000)/second

Message Throughput Performance

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.


Credits

  • Starting from version 0.15, the MQTT encoding and decoding implementation is partially inspired by and derived from ntex-mqtt.

  • For versions 0.13 and earlier, this project relied on maintained forked versions of the ntex and ntex-mqtt crates as dependencies.

License

Licensed under either of MIT or [Apache 2.0](

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rust5gbrokercluster-serverecosystem

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言