Skip to content
View robustmq's full-sized avatar

Block or report robustmq

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please donโ€™t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this userโ€™s behavior. Learn more about reporting abuse.

Report abuse
robustmq/README.md

RobustMQ Logo

Ask DeepWiki zread Latest Release License GitHub issues GitHub stars Coverage Build Status Rust Version

Communication infrastructure for the AI era โ€” one binary, one broker, one storage layer, any protocol

What is RobustMQ โ€ข mq9 โ€ข Features โ€ข Roadmap โ€ข Quick Start โ€ข Documentation โ€ข Contributing โ€ข Community


โš ๏ธ Development Status RobustMQ is in early development and not yet production-ready. MQTT core is stable and continuing to mature. Kafka, NATS, and AMQP are under active development. Production readiness is targeted for 0.4.0.


๐ŸŒŸ What is RobustMQ

RobustMQ is a unified messaging engine built with Rust. One binary, one broker, no external dependencies โ€” deployable from edge devices to cloud clusters. It natively supports MQTT, Kafka, NATS, AMQP, and mq9 on a shared storage layer: one message written once, consumed by any protocol.

RobustMQ Architecture

MQTT publish  โ†’  RobustMQ unified storage  โ†’  Kafka consume
                                           โ†’  NATS subscribe
                                           โ†’  AMQP consume
                                           โ†’  mq9 Agent mailbox

Five protocols, one system:

Protocol Best for
MQTT IoT devices, edge sensors
Kafka Streaming data pipelines, analytics
NATS Ultra-low-latency pub/sub
AMQP Enterprise messaging, RabbitMQ migration
mq9 AI Agent async communication

๐Ÿค– mq9 โ€” Agent Mailbox for AI

mq9 is RobustMQ's communication layer designed for AI Agents. Just like people have email โ€” you send a message, the recipient reads it when they're available โ€” Agents need the same. Today, when Agent A sends a message to Agent B and B is offline, the message is gone. Every team works around this with Redis pub/sub, database polling, or homegrown queues.

mq9 solves it directly: send a message, the recipient gets it when they come online.

Operation Subject What it does
MAILBOX.CREATE $mq9.AI.MAILBOX.CREATE Create a private or public mailbox
Send $mq9.AI.MAILBOX.MSG.{mail_id} / .urgent / .critical Deliver a message โ€” three levels: critical / urgent / normal (default, no suffix)
Subscribe $mq9.AI.MAILBOX.MSG.{mail_id}.* Receive all priorities; new arrivals pushed in real time
Discover $mq9.AI.PUBLIC.LIST Discover all public mailboxes
# Create a private mailbox โ€” returns mail_id
nats req '$mq9.AI.MAILBOX.CREATE' '{"ttl":3600}'
# โ†’ {"mail_id":"mail-d7a5072lko83gp7amga0-d7a5072lko83gp7amgag","is_new":true}

# Send to another Agent's mailbox (works even if they're offline)
nats pub '$mq9.AI.MAILBOX.MSG.mail-d7a5072lko83gp7amga0-d7a5072lko83gp7amgag' \
  '{"type":"task_result","payload":"done","ts":1234567890}'

# Create a public mailbox (task queue), discoverable via PUBLIC.LIST
nats req '$mq9.AI.MAILBOX.CREATE' '{"ttl":3600,"public":true,"name":"task.queue","desc":"Task queue"}'
nats pub '$mq9.AI.MAILBOX.MSG.task.queue' '{"type":"data_analysis"}'

# Subscribe to your mailbox โ€” receives all non-expired messages immediately, in priority order
nats sub '$mq9.AI.MAILBOX.MSG.mail-d7a5072lko83gp7amga0-d7a5072lko83gp7amgag.*'

Multiple integration paths: any NATS client connects directly; the RobustMQ SDK covers Go, Python, Rust, JavaScript, Java, and C#; the langchain-mq9 toolkit plugs into LangChain and LangGraph; and an MCP Server provides JSON-RPC 2.0 access for tools like Dify.

mq9 is RobustMQ's fifth native protocol, alongside MQTT, Kafka, NATS, and AMQP, built on the same unified storage layer. Deploy one RobustMQ instance โ€” mq9 is ready.

๐Ÿ“– mq9 Documentation


โœจ Features

  • ๐Ÿค– mq9 โ€” AI Agent communication: Agent mailboxes with persistent store-first delivery, three-level priority (critical / urgent / normal), TTL auto-cleanup, and public mailbox discovery โ€” async Agent-to-Agent messaging, no simultaneous online required
  • ๐Ÿฆ€ Rust-native: No GC, stable and predictable memory footprint, no periodic spikes โ€” consistent from edge devices to cloud clusters
  • ๐Ÿ—„๏ธ Unified storage layer: All protocols share one storage engine โ€” data written once, consumed by any protocol, no duplication
  • ๐Ÿ”Œ Native multi-protocol: MQTT 3.1/3.1.1/5.0, Kafka, NATS, AMQP, mq9 โ€” natively implemented, full protocol semantics
  • ๐Ÿข Native multi-tenancy: Unified across all protocols โ€” full data isolation and independent permission management per tenant
  • ๐ŸŒ Edge-to-cloud: Single binary, zero dependencies, offline buffering with auto-sync โ€” same runtime from edge gateways to cloud clusters
  • โšก Ultra-low-latency dispatch: NATS pure in-memory routing โ€” no disk writes, millisecond to sub-millisecond latency
  • ๐Ÿ’พ Multi-mode storage: Memory / RocksDB / File, per-topic configuration, automatic cold data tiering to S3
  • ๐Ÿ”„ Shared subscription: Break the "concurrency = partition count" limit โ€” consumers scale elastically at any time
  • ๐Ÿ› ๏ธ Minimal operations: Single binary, zero external dependencies, built-in Raft consensus, ready out of the box

๐Ÿ—บ๏ธ Roadmap

Phase 1 โ€” MQTT (current)
  MQTT core production-ready, continuously refined to be the best MQTT Broker available
  Architecture and infrastructure hardened in parallel

Phase 2 โ€” NATS + mq9 AI Agent (in progress)
  NATS protocol compatibility + mq9 Agent mailbox with priority & public discovery
  Native Agent async communication layer

Phase 3 โ€” Kafka (in progress)
  Full Kafka protocol compatibility
  Complete the IoT-to-streaming data path, edge-to-cloud data flow

Phase 4 โ€” AMQP (planned)
  Full AMQP protocol compatibility
  Traditional enterprise messaging migration path
Feature Status
MQTT 3.x / 5.0 core โœ… Available
Session persistence and recovery โœ… Available
Shared subscription โœ… Available
Authentication and ACL โœ… Available
Grafana + Prometheus monitoring โœ… Available
Web management console โœ… Available
Kafka protocol ๐Ÿšง In development
NATS protocol ๐Ÿ”ฌ Demo validated, in development
AMQP protocol ๐Ÿ”ฌ Demo validated, in development
mq9 โ€” AI Agent mailbox ๐Ÿ”ฌ Demo validated, in development

๐Ÿ—๏ธ Architecture

RobustMQ has three components with fixed, clean boundaries:

  • Meta Service โ€” metadata management, Raft-based consensus
  • Broker โ€” protocol parsing and routing (MQTT / Kafka / NATS / AMQP / mq9)
  • Storage Engine โ€” unified data storage with pluggable backends

Adding a new protocol means implementing only the Broker parsing layer. Adding a new storage backend means implementing only the Storage Engine interface. The core architecture does not change.

๐Ÿš€ Quick Start

One-Line Installation

curl -fsSL https://raw.githubusercontent.com/robustmq/robustmq/main/scripts/install.sh | bash
broker-server start

Multi-Protocol in Action

# Publish via MQTT
mqttx pub -h localhost -p 1883 -t "robustmq.multi.protocol" -m "Hello RobustMQ!"

# Consume the same message via Kafka
kafka-console-consumer.sh --bootstrap-server localhost:9092 \
  --topic robustmq.multi.protocol --from-beginning

# Consume the same message via NATS
nats sub "robustmq.multi.protocol"

mq9 Agent Mailbox in Action

# Agent A creates a mailbox โ€” returns mail_id
nats req '$mq9.AI.MAILBOX.CREATE' '{"ttl":3600}'

# Agent B sends to Agent A (works even if A is offline)
nats pub '$mq9.AI.MAILBOX.MSG.{mail_id_a}' '{"type":"task","payload":"hello","ts":1234567890}'

# Agent A subscribes and receives all non-expired messages in priority order
nats sub '$mq9.AI.MAILBOX.MSG.{mail_id_a}.*'

Web Dashboard

Access http://localhost:8080 for cluster monitoring and management.

Web UI Web UI Cluster

Try Online Demo

๐Ÿ“š Full installation and usage guide: Documentation

๐Ÿ”ง Development

git clone https://github.com/robustmq/robustmq.git
cd robustmq
cargo run --package cmd --bin broker-server

make build           # Basic build
make build-full      # With frontend

๐Ÿ“š Build Guide

๐Ÿ“š Documentation

mq9 SDK

Install the mq9 SDK for your language:

# Python
pip install robustmq

# JavaScript / TypeScript
npm install @robustmq/sdk

# Rust
cargo add robustmq

# Go
go get github.com/robustmq/robustmq-sdk/go

# Java (Maven)
# <dependency><groupId>com.robustmq</groupId><artifactId>robustmq</artifactId><version>0.3.5</version></dependency>

# C# (.NET)
dotnet add package RobustMQ

Or use any NATS client library directly โ€” no SDK required.

๐Ÿค Contributing

We welcome contributions. See our Contribution Guide and Good First Issues.

๐ŸŒ Community

๐Ÿ‡จ๐Ÿ‡ณ Chinese Community

  • ๅพฎไฟก็พค: Join our WeChat group for Chinese-speaking users

    WeChat Group QR Code
  • ๅผ€ๅ‘่€…ๅพฎไฟก: If the group QR code has expired, follow our official WeChat account

    WeChat Official Account QR Code

License

RobustMQ is licensed under the Apache License 2.0. See LICENSING.md for details.


Built with โค๏ธ by the RobustMQ team and contributors.

Popular repositories Loading

  1. robustmq robustmq Public

    Communication infrastructure for the AI era โ€” one binary, one broker, one storage layer, any protocol

    Rust 1.5k 216

  2. robustmq-geek robustmq-geek Public

    Rust 57 8

  3. robustmq-copilot robustmq-copilot Public

    The one-stop RobustMQ operation and maintenance management platform

    TypeScript 6 6

  4. raft-rs raft-rs Public

    Forked from tikv/raft-rs

    Raft distributed consensus algorithm implemented in Rust.

    Rust

  5. greptimedb greptimedb Public

    Forked from GreptimeTeam/greptimedb

    An Open-Source, Cloud-Native, Unified Time Series Database for Metrics, Logs and Events with SQL/PromQL supported. Available on GreptimeCloud.

    Rust

  6. MQTTX MQTTX Public

    Forked from emqx/MQTTX

    A Powerful and All-in-One MQTT 5.0 client toolbox for Desktop, CLI and WebSocket.

    TypeScript