-
Notifications
You must be signed in to change notification settings - Fork 228
Open
Labels
Difficulty level/ModerateModerate difficult ISSUEModerate difficult ISSUEepicfeature🚀Suggest an idea for this project.Suggest an idea for this project.help wantedExtra attention is neededExtra attention is needed
Description
Feature Description
Create a new broker_commands module in rocketmq-admin-core to implement all broker management commands, achieving feature parity with Java RocketMQ tools.
Problem/Motivation
The rocketmq-admin-core crate currently has commands for auth, consumer, controller, namesrv, and topic management, but lacks broker-specific management commands that are available in the Java version. These broker commands are essential for:
- Broker monitoring and status checks
- Configuration management
- Storage cleanup and maintenance
- Performance tuning
- High availability operations
- Tiered storage management
Proposed Solution
Create a comprehensive broker_commands module that implements all 15 broker management commands from Java RocketMQ:
Module Structure
rocketmq-tools/rocketmq-admin/rocketmq-admin-core/src/commands/
└── broker_commands/
├── broker_consume_stats.rs
├── broker_status.rs
├── clean_expired_cq.rs
├── clean_unused_topic.rs
├── commit_log_set_read_ahead.rs
├── delete_expired_commit_log.rs
├── get_broker_config.rs
├── get_broker_epoch.rs
├── get_cold_data_flow_ctr_info.rs
├── remove_cold_data_flow_ctr_group_config.rs
├── reset_master_flush_offset.rs
├── send_msg_status.rs
├── switch_timer_engine.rs
├── update_broker_config.rs
└── update_cold_data_flow_ctr_group_config.rs
Related Issues (Subtasks)
- [Feature🚀] Implement BrokerConsumeStats command in rocketmq-admin-core #6278 - BrokerConsumeStats command
- [Feature🚀] Implement BrokerStatus command in rocketmq-admin-core #6273 - BrokerStatus command
- [Feature🚀] Implement CleanExpiredCQ command in rocketmq-admin-core #6272 - CleanExpiredCQ command
- [Feature🚀] Implement CleanUnusedTopic command in rocketmq-admin-core #6267 - CleanUnusedTopic command
- [Feature🚀] Implement CommitLogSetReadAhead command in rocketmq-admin-core #6266 - CommitLogSetReadAhead command
- [Feature🚀] Implement DeleteExpiredCommitLog command in rocketmq-admin-core #6277 - DeleteExpiredCommitLog command
- [Feature🚀] Implement GetBrokerConfig command in rocketmq-admin-core #6265 - GetBrokerConfig command
- [Feature🚀] Implement GetBrokerEpoch command in rocketmq-admin-core #6269 - GetBrokerEpoch command
- [Feature🚀] Implement GetColdDataFlowCtrInfo command in rocketmq-admin-core #6274 - GetColdDataFlowCtrInfo command
- [Feature🚀] Implement RemoveColdDataFlowCtrGroupConfig command in rocketmq-admin-core #6275 - RemoveColdDataFlowCtrGroupConfig command
- [Feature🚀] Implement ResetMasterFlushOffset command in rocketmq-admin-core #6276 - ResetMasterFlushOffset command
- [Feature🚀] Implement SendMsgStatus command in rocketmq-admin-core #6271 - SendMsgStatus command
- [Feature🚀] Implement SwitchTimerEngine command in rocketmq-admin-core #6268 - SwitchTimerEngine command
- [Feature🚀] Implement UpdateBrokerConfig command in rocketmq-admin-core #6264 - UpdateBrokerConfig command
- [Feature🚀] Implement UpdateColdDataFlowCtrGroupConfig command in rocketmq-admin-core #6270 - UpdateColdDataFlowCtrGroupConfig command
Implementation Approach
- Create the
broker_commandsmodule structure - Define common traits and utilities for broker commands
- Implement each command following the pattern established in existing command modules
- Add comprehensive unit tests for each command
- Add integration tests for end-to-end functionality
- Update documentation and examples
Key Considerations
- Follow Rust idiomatic patterns and the project's coding standards
- Ensure compatibility with Java RocketMQ broker protocol
- Implement proper error handling and validation
- Add detailed logging for operational visibility
- Design CLI interface consistent with existing commands
Alternatives
- Could implement commands incrementally without creating module structure first
- Could merge some similar commands, but better to maintain 1:1 mapping with Java for compatibility
Additional Context
- Java Reference: https://github.com/apache/rocketmq/tree/develop/tools/src/main/java/org/apache/rocketmq/tools/command/broker
- Target crate:
rocketmq-admin-core - Related project: Achieving complete feature parity with Java RocketMQ tools
Acceptance Criteria
- Module structure created with proper organization
- All 15 broker commands implemented
- Unit tests with >80% code coverage
- Integration tests for critical commands
- Documentation updated (README, examples)
- CLI help text for all commands
- All related issues ([Feature🚀] Implement UpdateBrokerConfig command in rocketmq-admin-core #6264-[Feature🚀] Implement BrokerConsumeStats command in rocketmq-admin-core #6278) closed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Difficulty level/ModerateModerate difficult ISSUEModerate difficult ISSUEepicfeature🚀Suggest an idea for this project.Suggest an idea for this project.help wantedExtra attention is neededExtra attention is needed