huangcv / rmqtt

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RMQTT Broker

GitHub Release Rust Version

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, ntex , ntex-mqtt;

  • 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;
  • Built-in AUTH/ACL;

  • HTTP AUTH/ACL;

  • WebHook;

  • HTTP APIs;

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

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
  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 "1@172.17.0.3:5363" "2@172.17.0.4:5363" "3@172.17.0.5:5363" --raft-peer-addrs "1@172.17.0.3:6003" "2@172.17.0.4:6003" "3@172.17.0.5: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 "1@172.17.0.3:5363" "2@172.17.0.4:5363" "3@172.17.0.5:5363" --raft-peer-addrs "1@172.17.0.3:6003" "2@172.17.0.4:6003" "3@172.17.0.5: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 "1@172.17.0.3:5363" "2@172.17.0.4:5363" "3@172.17.0.5:5363" --raft-peer-addrs "1@172.17.0.3:6003" "2@172.17.0.4:6003" "3@172.17.0.5:6003"

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

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.

Experience

About

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

License:MIT License


Languages

Language:Rust 99.8%Language:Dockerfile 0.1%Language:Makefile 0.1%