Closed 847850277 closed 2 months ago
The changes enhance the RocketMQ broker's functionality by introducing a new feature that allows querying which consumer groups are subscribed to specific topics. This is achieved through modifications in the BrokerRequestProcessor
, ConsumerManager
, and AdminBrokerProcessor
, along with the addition of new request handling capabilities and data structures to support the querying mechanism.
Files | Change Summary |
---|---|
rocketmq-broker/src/broker_runtime.rs |
Added self.consumer_manager.clone() to BrokerRequestProcessor constructor. |
rocketmq-broker/src/client/manager/consumer_manager.rs |
Introduced pub fn query_topic_consume_by_who to query consumer groups by topic. |
rocketmq-broker/src/processor/admin_broker_processor.rs |
Added consume_manager: Arc<ConsumerManager> to Inner struct and case for RequestCode::QueryTopicConsumeByWho . |
rocketmq-broker/src/processor/admin_broker_processor/topic_request_handler.rs |
Added asynchronous method query_topic_consume_by_who to handle related requests. |
rocketmq-remoting/src/protocol/body.rs |
Introduced new module group_list for organizing group-related functionalities. |
rocketmq-remoting/src/protocol/body/group_list.rs |
Defined GroupList struct for managing a collection of groups. |
rocketmq-remoting/src/protocol/header.rs |
Added new module query_topic_consume_by_who_request_header . |
rocketmq-remoting/src/protocol/header/query_topic_consume_by_who_request_header.rs |
Defined QueryTopicConsumeByWhoRequestHeader for handling relevant request headers. |
sequenceDiagram
participant Client
participant AdminBrokerProcessor
participant ConsumerManager
participant TopicRequestHandler
Client->>AdminBrokerProcessor: Request to query topic consumers
AdminBrokerProcessor->>ConsumerManager: query_topic_consume_by_who(topic)
ConsumerManager-->>AdminBrokerProcessor: Return consumer group list
AdminBrokerProcessor-->>Client: Send consumer group list
Objective | Addressed | Explanation |
---|---|---|
Support AdminBrokerProcessor query_topic_consume_by_who (#[894]) | ✅ |
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 0%
with 58 lines
in your changes missing coverage. Please review.
Project coverage is 24.21%. Comparing base (
46a5ad2
) to head (f51e9c1
). 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 #894
Brief Description
How Did You Test This Change?
Summary by CodeRabbit
New Features
Improvements