🚀 Apache RocketMQ built in Rust 🦀 — faster, safer, and more memory-efficient. Powering high-performance messaging for the AI era, with AI Agent, MCP, and AI-SRE capabilities.
🚀 A high-performance, reliable, and feature-rich unofficial Rust implementation of Apache RocketMQ, designed to bring enterprise-grade message middleware to the Rust ecosystem.
RocketMQ-Rust reimplements Apache RocketMQ in Rust: the NameServer, Broker, Controller and Proxy services, an async client SDK, and the tooling to operate them. It keeps RocketMQ's model of topics, queues, consumer groups and NameServer routing, speaks the RocketMQ remoting protocol, and serves the gRPC MessagingService through its Proxy, while relying on Rust's ownership model for memory safety and on Tokio for asynchronous I/O.
Status:
1.1.0is the current stable release. Development for1.2.0continues onmain. All 28 publishable workspace crates are available on crates.io, and 13 container images are published on Docker Hub and GHCR. RocketMQ-Rust is an independent community distribution, not an official Apache Software Foundation release.
MessagingService, and converts existing Java Broker .properties files; Apache RocketMQ 5.5.0 is the comparison baseline
[Doc📝] Clarify how RuntimeConfig sizes the blocking pool for consume listeners
https://github.com/mxsm/rocketmq-rust/issues/13613
Labels: documentation📝, help wanted, good first issue, rust, Difficulty level/Easy
[Doc📝] Document the pending-command check in KVConfigManager::persist_if_needed
https://github.com/mxsm/rocketmq-rust/issues/13612
Labels: documentation📝, help wanted, good first issue, rust, Difficulty level/Easy, rocketmq-namesrv crate
[Doc📝] Correct the key and value layout in CommandCustomHeader::write_if_not_null Rustdoc
https://github.com/mxsm/rocketmq-rust/issues/13611
Labels: documentation📝, help wanted, good first issue, rust, Difficulty level/Easy
[Doc📝] Document the offset comparison returned by MappedFileQueue::commit
https://github.com/mxsm/rocketmq-rust/issues/13610
Labels: documentation📝, help wanted, good first issue, rust, Difficulty level/Easy, rocketmq-store crate
[Doc📝] Correct the same-queue concurrency guarantee in MessageListenerConcurrently
https://github.com/mxsm/rocketmq-rust/issues/13609
Labels: documentation📝, help wanted, good first issue, rust, Difficulty level/Easy, rocketmq-client crate
[Refactor♻️] Migrate rocketmq-store capacity probes and root locking from fs2 to fs4
https://github.com/mxsm/rocketmq-rust/issues/13592
Labels: help wanted, good first issue, refactor♻️, rust, Difficulty level/Easy, rocketmq-store crate
[Doc📝] Clarify SelectMessageQueueByHash routing stability and hashing cost
https://github.com/mxsm/rocketmq-rust/issues/13559
Labels: documentation📝, help wanted, good first issue, rust, Difficulty level/Easy, rocketmq-client crate
[Doc📝] Clarify when MessageBatch::final_message contains the encoded body
https://github.com/mxsm/rocketmq-rust/issues/13558
Labels: documentation📝, help wanted, good first issue, rust, Difficulty level/Easy
[Refactor♻️] Rename ExecuteOutcome to ExecutionSummary in rocketmq-sre-executor
https://github.com/mxsm/rocketmq-rust/issues/13433
Labels: help wanted, good first issue, refactor♻️, rust, Difficulty level/Easy
First off, thank you for considering contributing to rocketmq-rust.
If your contribution is not straightforward, please first discuss the change you wish to make by creating a new issue before making the change.
Before reporting an issue on the issue tracker, please check that it has not already been reported by searching for some related keywords.
Try to do one pull request per change.
Update the changes you have made in CHANGELOG file under the Unreleased section.
Add the changes of your pull request to one of the following subsections, depending on the types of changes defined by Keep a changelog:
Added for new features.Changed for changes in existing functionality.Deprecated for soon-to-be removed features.Removed for now removed features.Fixed for any bug fixes.Security in case of vulnerabilities.If the required subsection does not exist yet under Unreleased, create it!
This is no different than other Rust projects.
git clone https://github.com/mxsm/rocketmq-rust
cd rocketmq-rust
cargo test
Build and run release version:
cargo build --release && cargo run --release
Run Clippy:
cargo clippy --all-targets --all-features --workspace
Run all tests:
cargo test --all-features --workspace
Check to see if there are code formatting issues
cargo fmt --all -- --check
Format the code in the project
cargo fmt --all
Use taplo to format Cargo.toml files across the repository
cargo install taplo-cli --locked
taplo format -o align_entries=true **/Cargo.toml
RequestHeaderCodec, the only supported
request-header derive. Register new headers in the typed registry and
checked-in inventory. Preserve historical currentCodec = "v3" records in
the migration inventory.RuntimeOwner. Background work
receives an injected ServiceContext/ChildServiceContext or a parent
TaskGroup rather than creating another runtime or detached task.unwrap, expect, or a string-only
error path for protocol, I/O, configuration, or lifecycle failures.Before opening a pull request that changes these boundaries, run:
cargo test -p rocketmq-protocol --test request_header_codec_registry
python scripts/rust_hygiene_guard.py --scope core-release
When adding or changing an error that can cross crate, process, protocol, or CLI boundaries:
rocketmq_error::Result<T> in canonical library APIs. A component may
expose a narrow result facade only when it carries Error or SharedError
without losing descriptor identity, context, or typed sources.anyhow::Result from library or public business APIs.ErrorDescriptor entry before exposing a new
public failure. Construct source-free failures with Error::new and retain
typed causes with Error::caused_by.PublicErrorView or DiagnosticView for approved context fields and descriptor-owned projection primitives for remoting, gRPC, HTTP, and CLI responses.ErrorContext; represent
sensitive details with typed presence fields rather than their raw values.#[source] instead of early stringification.SharedError when several owners need the same canonical failure; do not
clone or reconstruct an error from Display output.CORE_INTERNAL_FAILURE only for audited internal invariants, not
ordinary business failures.Run the error hygiene guard before opening a pull request:
python scripts/error_architecture_guard.py
On Windows, the same guard is available through:
.\scripts\check-error-hygiene.ps1