SakiMQ is a lightweight message queue system implemented in Java.
This is a wheel project. Its purpose is not to create a high-performance, highly-available message queue, but to implement a basic MQ.
Who is Saki? Reference: Tenma Saki
- Publish-Subscribe Pattern & Observer Pattern & Pull Model.
- The explicit queue leverages Disruptor with its zero-copy capability, a design approach more akin to that of RocketMQ.
- The integration of Netty's I/O multiplexing and JDK21's virtual threads enables high-performance concurrency with a concise synchronous coding style.
- Components communicate efficiently via Protobuf.
- Multiple design patterns were applied. For example, use the builder pattern for the creation of Exchange.
- At-least-once delivery is guaranteed through the ACK confirmation mechanism, while at-most-once delivery is ensured through idempotent processing between the Producer and the Broker.
- Adopts RFC 1982 serial number arithmetic, ensuring correct and overflow-safe sequence comparison on a wrap-around 64-bit counter.
- Push model may be optional?
- bootstrap.servers / NameServer
- Load balancing
- Heartbeat
- Auto-sharding
- Consumer group (multiple consumers within one group)
- Message log content persistence (currently only metadata + body length is logged even when message logging is enabled)
There are still a large number of features that have not been implemented.