This document provides a high-level introduction to RobustMQ, a next-generation message queue system built in Rust. It covers the project's design philosophy, core features, system architecture, and major components. This overview serves as the entry point for understanding the entire RobustMQ codebase.
For detailed information about specific subsystems:
RobustMQ is a high-performance, multi-protocol message queue system designed for modern cloud-native and AI-native applications. Built entirely in Rust, it provides microsecond-level latency with zero garbage collection pauses while supporting multiple messaging protocols including MQTT 3.x/5.0, Kafka, and AMQP through a unified platform.
The system employs compute-storage separation architecture, enabling stateless broker nodes that can scale elastically in seconds. This design allows RobustMQ to support various deployment scenarios from edge devices to large-scale cloud clusters.
Current Development Status: RobustMQ is in Phase 1 (Foundation building) and is not production-ready. The project is actively developing its core architecture and MQTT broker implementation.
Sources: README.md38-60
RobustMQ is built on two core principles:
The system addresses critical challenges in the AI era:
As a community-driven project (not commercial), RobustMQ prioritizes:
The project invests significant time in Phase 1 to create a scalable technical architecture with streamlined, abstraction-friendly code that supports multi-protocol adaptation, pluggable storage, and extensibility.
Sources: README.md41-60
| Feature | Description | Implementation Status |
|---|---|---|
| High Performance | Rust-powered zero-cost abstractions with microsecond latency and zero GC pauses | ✅ Active |
| Compute-Storage Separation | Stateless broker nodes enable second-level elastic scaling and Serverless deployment | ✅ Active |
| Multi-Protocol Unified | Native support for MQTT 3.1/3.1.1/5.0, Kafka, and AMQP with protocol isolation | 🔄 MQTT Active, Kafka/AMQP Planned |
| Intelligent Storage Tiering | Memory/SSD/Object storage with Topic-level engine selection for cost optimization | ✅ Active |
| Cloud-Native Ready | Kubernetes-native with auto-scaling, service discovery, and container-friendly deployment | ✅ Active |
| Zero-Operations | Single binary deployment with built-in Raft consensus and comprehensive management tools | ✅ Active |
| Enterprise Security | Multi-auth support, fine-grained permissions, and end-to-end encryption | ✅ Active |
| Full Observability | Prometheus metrics, OpenTelemetry tracing, and Grafana dashboards | ✅ Active |
Sources: README.md75-85
RobustMQ employs a four-layer distributed architecture that separates concerns and enables independent scaling of each layer:
Sources: README.md87-101 docs/zh/ContributionGuide/ContributingCode/Code-Structure.md8-16
The BrokerServer (src/broker-server/) serves as the central orchestrator that coordinates all protocol brokers and provides a unified service entry point.
Key Responsibilities:
Core Files:
src/broker-server/src/cluster_service.rs - Cluster service managementsrc/broker-server/src/grpc.rs - gRPC service interfacessrc/broker-server/src/metrics.rs - Performance metrics collectionThe broker can run in three modes controlled by configuration flags:
is_broker_node=true - Runs protocol brokersis_meta_node=true - Runs meta serviceis_engine_node=true - Runs storage engineSources: README.md93-94 docs/zh/ContributionGuide/ContributingCode/Code-Structure.md39-46
The Meta Service (src/meta-service/) implements a Raft-based distributed metadata management system that coordinates the entire cluster.
Key Responsibilities:
Core Components:
Metadata Types Managed (13+ types):
Sources: README.md94 docs/zh/ContributionGuide/ContributingCode/Code-Structure.md47-56 src/meta-service/src/raft/route/mqtt.rs53-67
The MQTT Broker (src/mqtt-broker/) implements MQTT protocol versions 3.x, 4.x, and 5.0 with full feature support.
Key Components:
Port Configuration:
:1883:8883:8083Sources: README.md93 docs/zh/ContributionGuide/ContributingCode/Code-Structure.md66-74
The Bridge and Connector System is RobustMQ's most important feature (importance score: 314.63), enabling MQTT messages to be forwarded to 10 different external systems.
Supported External Sinks:
Architecture:
Connector Lifecycle:
run_connector_loopMessageStorageDiscard, DiscardAfterRetry, DeadMessageQueueSources: README.md96 docs/zh/ContributionGuide/ContributingCode/Code-Structure.md66-74
The Storage Layer implements a three-tier architecture providing unified storage abstraction with pluggable backends:
Storage Operations:
create_shard, list_shard, delete_shard - Shard managementbatch_write, read_by_offset, read_by_key, read_by_tag - Data operationscommit_offset, get_offset_by_group - Consumer group managementPerformance Tiers:
Sources: README.md96-97 docs/zh/ContributionGuide/ContributingCode/Code-Structure.md132-142
The Admin Server (src/admin-server/) provides HTTP REST APIs for cluster management, while robust-ctl (src/cli-command/) offers command-line administration.
Admin HTTP API Endpoints:
/mqtt/topic/create, /mqtt/user/create, /mqtt/session/list/connector/create, /connector/delete, /connector/detail/cluster/nodes, /cluster/config:9000, $SYS topicsCLI Command Structure:
Sources: README.md98 docs/zh/ContributionGuide/ContributingCode/Code-Structure.md87-103
RobustMQ supports flexible deployment modes:
All services (broker, meta, storage) run in a single process:
Services run on separate nodes with role-based configuration:
is_meta_node=true - Run Raft consensus and metadata managementis_broker_node=true - Run protocol brokers (MQTT/Kafka/AMQP)is_engine_node=true - Run storage engine servicesConfiguration Example:
Sources: README.md97-98
RobustMQ uses a Makefile for common development tasks:
| Command | Purpose |
|---|---|
make run | Run broker-server in development mode |
make codecheck | Run format, check, clippy, license, docs |
make build | Build current platform package (basic) |
make build-full | Build complete package with frontend |
make test | Run unit tests with cargo nextest |
make ig-test | Run integration tests |
make release | Create GitHub release and upload package |
make release-docker | Build and push Docker image to GHCR |
Build Artifacts:
robust-server - Main server binary (broker + meta + storage)robust-ctl - Command-line management toolrobust-bench - Performance benchmarking toolSources: makefile1-99
| Category | Technologies |
|---|---|
| Language | Rust 1.70+ |
| Consensus | Raft (openraft crate) |
| Storage | RocksDB, Memory, File Segments, MySQL, PostgreSQL |
| Protocol | MQTT 3.x/5.0, Kafka (planned), AMQP (planned) |
| Transport | TCP, TLS, WebSocket, QUIC |
| Serialization | Protobuf, JSON, Avro |
| Observability | Prometheus, OpenTelemetry, Grafana |
| Container | Docker, Kubernetes |
| Testing | cargo nextest, integration tests |
Sources: README.md18 src/schema-register/src/schema.rs54-69
Building scalable technical architecture with solid, streamlined code. Establishing foundation for multi-protocol adaptation, pluggable storage, extensibility, and elasticity. Significant time investment to avoid future refactoring.
Deliver stable, high-performance MQTT Broker with complete protocol support (MQTT 3.x/5.0/SN). Optimize for edge deployment with package size under 20MB.
Start Kafka protocol adaptation work after achieving Phase 1 and 2 goals.
Long-term Vision: Become the next-generation cloud-native and AI-native messaging infrastructure, aspiring to Apache top-level project status.
Sources: README.md61-73
RobustMQ includes Schema Registry functionality for message validation:
Supported Schema Types:
Architecture:
Usage:
Sources: src/schema-register/src/schema.rs23-145 src/common/metadata-struct/src/schema.rs20-69
RobustMQ supports regex-based topic rewriting for flexible message routing:
Data Structure:
Use Cases:
Sources: src/common/metadata-struct/src/mqtt/topic_rewrite_rule.rs18-35 src/meta-service/src/raft/route/mqtt.rs202-219
To begin working with RobustMQ:
Quick Links:
Sources: README.md152-158
RobustMQ is an ambitious project aiming to unify multiple messaging protocols in a single, high-performance platform. Its compute-storage separation architecture, multi-protocol support, and extensive integration capabilities (10 external sinks) make it suitable for diverse use cases from edge computing to cloud-scale deployments.
The project is community-driven and prioritizes long-term architectural soundness over rapid feature delivery. While currently in early development (Phase 1), the foundation being built supports future scalability and extensibility.
Key Differentiators:
Sources: README.md41-60 README.md75-101
Refresh this wiki
This wiki was recently refreshed. Please wait 1 day to refresh again.