Closed mxsm closed 3 months ago
The recent updates significantly enhance the RocketMQ broker with new rebalancing and dead-letter queue (DLQ) functionalities. A RebalanceLockManager
was integrated into the BrokerRuntime
for better message queue management. Several modules were restructured, including the introduction of the rebalance
module and the modification of the SendMessageProcessor
to handle retry and DLQ processing.
File Path | Change Summary |
---|---|
rocketmq-broker/Cargo.toml | Added lazy_static.workspace = true to dependencies. |
rocketmq-broker/src/broker_runtime.rs | Integrated RebalanceLockManager into BrokerRuntime and updated related implementations. |
rocketmq-broker/src/client.rs | Introduced a new rebalance module within the net package. |
rocketmq-broker/src/client/rebalance.rs | Created rebalance_lock_manager module for managing message queue locks during rebalancing. |
rocketmq-broker/src/.../rebalance_lock_manager.rs | Added functionality for lock management on message queues for rebalancing. |
rocketmq-broker/src/processor.rs | Restructured and removed various imports and functions related to message processing. |
rocketmq-broker/src/processor/send_message_processor.rs | Updated SendMessageProcessor struct and methods to handle retry and DLQ processing using Inner<MS> . |
rocketmq-common/src/common/mix_all.rs | Added get_dlq_topic and is_lmq functions for DLQ topic handling and prefix checking. |
sequenceDiagram
participant Client
participant BrokerRuntime
participant RebalanceLockManager
participant SendMessageProcessor
Client->>BrokerRuntime: Send message
BrokerRuntime->>RebalanceLockManager: Lock queue for rebalancing
RebalanceLockManager->>BrokerRuntime: Queue locked
BrokerRuntime->>SendMessageProcessor: Process message
SendMessageProcessor-->>BrokerRuntime: Message processed (retry/DLQ if needed)
BrokerRuntime-->>Client: Acknowledge message receipt
Objective | Addressed | Explanation |
---|---|---|
Implement SendMessageProcessor#handleRetryAndDLQ (#793) | ✅ |
In the broker's heart, the messages fly,
With rebalancing locks, they touch the sky.
Retry and DLQ, now handled with grace,
In RocketMQ's embrace, they find their place.
🎩✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
🚀Thanks for your contribution🎉. CodeRabbit(AI) will review your code first🔥
Attention: Patch coverage is 35.38874%
with 241 lines
in your changes missing coverage. Please review.
Project coverage is 28.11%. Comparing base (
93135eb
) to head (c64b65a
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Which Issue(s) This PR Fixes(Closes)
Fixes #793
Brief Description
How Did You Test This Change?
Summary by CodeRabbit
New Features
RebalanceLockManager
for managing locks on message queues, enhancing message queue rebalancing capabilities.Refactor
Bug Fixes
SendMessageProcessor
for better handling of internal data structures.Chores