Closed mxsm closed 2 months ago
🚀Thanks for your contribution🎉. CodeRabbit(AI) will review your code first🔥
This pull request introduces significant enhancements to the RocketMQ client, focusing on the consumer module. Key changes include the implementation of a new concurrent message listener, improved error handling with updated error types, and the introduction of a rebalance strategy module. Additionally, the consumer configuration has been modified for better management, and several methods have been updated to support synchronous operations instead of asynchronous ones. Overall, these changes aim to improve the functionality and maintainability of the consumer implementation.
Files | Change Summary |
---|---|
rocketmq-client/examples/quickstart/consumer.rs |
Added a new concurrent message listener and updated the main function for message processing. |
rocketmq-client/src/base/validators.rs |
Replaced MQClientException with MQClientErr for error handling in validation methods. |
rocketmq-client/src/consumer.rs |
Introduced a new public module for rebalance strategies. |
rocketmq-client/src/consumer/allocate_message_queue_strategy.rs |
Changed return type of get_name method to &'static str . |
rocketmq-client/src/consumer/consumer_impl/default_mq_push_consumer_impl.rs |
Modified consumer configuration management and introduced new methods for consumer management. |
rocketmq-client/src/consumer/default_mq_push_consumer.rs |
Expanded ConsumerConfig and changed subscribe method to synchronous execution. |
rocketmq-client/src/error.rs |
Renamed error variants for clarity and consistency. |
rocketmq-client/src/consumer/rebalance_strategy.rs |
Added a function for validating consumer IDs within the queue context. |
rocketmq-client/src/consumer/rebalance_strategy/allocate_message_queue_averagely.rs |
Implemented round-robin allocation strategy for message queues. |
sequenceDiagram
participant Consumer
participant MessageQueue
participant Listener
Consumer->>MessageQueue: Subscribe to topic
MessageQueue-->>Consumer: Acknowledge subscription
Consumer->>Listener: Register message listener
Listener->>MessageQueue: Fetch messages
MessageQueue-->>Listener: Deliver messages
Listener->>Consumer: Process messages concurrently
Objective | Addressed | Explanation |
---|---|---|
Support client consumer message-3 ( #966 ) | ✅ |
approved, auto merge
🐰 In the meadow, messages flow,
With listeners ready, they steal the show.
Errors renamed, clear as can be,
Rabbit hops in, with joy and glee!
Consumer's dance, a synchronized play,
In RocketMQ's world, we leap and sway! 🌼
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?
Attention: Patch coverage is 0%
with 174 lines
in your changes missing coverage. Please review.
Project coverage is 21.24%. Comparing base (
c54bd64
) to head (3e5a7c8
). Report is 1 commits behind head on main.
: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 #966
Brief Description
How Did You Test This Change?
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Refactor
Style