About the project

A from-scratch rewrite of RocketMQ, built on 1,200 days of working with the original codebase and 400 days of writing this one.

Why it exists

Inheritance, not replacement theatre

Clean-RocketMQ follows RocketMQ closely: the same message model, the same client conventions, close to the same architecture. What changes is where the work happens — storage-compute separation is pushed down into the storage layer, and the write path is sharded.

The harder problem is not performance. It is keeping the code simple enough that the next person, or the next model, can still read it. That is the standard this project holds itself to.

repository layout
  • broker/Message intake, delivery and scheduling
  • store/CommitLog, storage boundaries
  • registry/Service discovery
  • rpc/Communication layer
  • common/Shared models and domain contracts
  • docs/ · learn/Architecture notes and reading material

< 50K

lines

lines of core code

RocketMQ is the simplest message queue

> 100K

lines

lines of refactor

RocketMQ-wolf, 4 years of production env practice.

> 5K

lines of comments

Rocketmq-comment, For study, Also for our books.

> 5

x

times Throughput gain

Clean-RocketMQ, rewritten from scratch, 120K+ lines.

> 5

books

RocketMQ books

Systematic accumulation: cycle of theory and practice

Engineering values

Three rules that decide what gets merged.

CLEAN

A micro-framework and DDD boundaries instead of layers of helpers. Readability is a merge criterion, not a nice-to-have.

Compatibility first

Existing RocketMQ clients and message conventions keep working, so adoption can be incremental.

Continuous evolution

Performance and features are added on top of a codebase that stays explainable.

Three branches, three jobs

Same maintainer, different purposes. Pick the one that matches what you need today.

RocketMQ-wolf

Refactor branch

Refactored branch of RocketMQ, used in production, with 10w+ optimizations and 1,200+ days of maintenance.

GitHub

RocketMQ-comment

Annotated reference

Official branch with annotations only — useful when you want the original code plus explanation.

GitHub

Clean-RocketMQ

This project

Rewritten from scratch: the inheritance and evolution of RocketMQ.

GitHub

Maintainer

Maintained by wolforest on GitHub. Issues, pull requests and reading notes all happen in the repository.

Open the GitHub profile

Released under the Apache-2.0 license.