Closed 847850277 closed 2 weeks ago
The changes introduce enhancements to the RocketMQ system, particularly focusing on the AdminBrokerProcessor
to support the retrieval of consumption statistics. This includes the addition of new methods and structures for managing and accessing consumer statistics and offsets, improving the overall functionality of the broker's administrative capabilities.
Files | Change Summary |
---|---|
rocketmq-broker/src/broker_runtime.rs |
Added broker_stats_manager to BrokerRequestProcessor constructor. |
rocketmq-broker/src/client/manager/consumer_manager.rs |
Introduced find_subscription_data_count method to retrieve subscription counts for consumer groups. |
rocketmq-broker/src/processor/admin_broker_processor.rs |
Added BrokerStatsManager to AdminBrokerProcessor and a new request handling case for GetConsumeStats . |
rocketmq-broker/src/processor/admin_broker_processor/consumer_request_handler.rs |
Introduced get_consume_stats method to handle consumption statistics requests. |
rocketmq-common/src/common/config.rs |
Added get_read_queue_nums method to TopicConfig . |
rocketmq-common/src/common/stats/stats_item_set.rs |
Added get_stats_data_in_minute method to StatsItemSet . |
rocketmq-remoting/src/protocol/admin.rs |
Introduced new public modules: consume_stats and offset_wrapper . |
rocketmq-remoting/src/protocol/admin/consume_stats.rs |
Defined ConsumeStats struct for managing consumption statistics. |
rocketmq-remoting/src/protocol/admin/offset_wrapper.rs |
Defined OffsetWrapper struct for managing offset data. |
rocketmq-remoting/src/protocol/header.rs |
Added new request header modules related to consumer statistics. |
rocketmq-remoting/src/protocol/header/get_consume_stats_request_header.rs |
Defined GetConsumeStatsRequestHeader struct for handling stats requests. |
rocketmq-store/src/stats/broker_stats_manager.rs |
Added tps_group_get_nums method for calculating TPS metrics and build_stats_key function. |
Objective | Addressed | Explanation |
---|---|---|
Support AdminBrokerProcessor get_consume_stats (##953) | β |
π° In a world of queues and stats so bright,
I hop along, my heart feels light.
With new requests and data to share,
Consumption metrics fill the air!
Let's dance and cheer, for changes are here,
In RocketMQ, we spread good cheer! π
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 190 lines
in your changes missing coverage. Please review.
Project coverage is 22.26%. Comparing base (
a62dcd0
) to head (5d17130
). Report is 4 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 #953
Brief Description
How Did You Test This Change?
Summary by CodeRabbit
New Features
Bug Fixes
Documentation