Skip to content

[Feature🚀] Implement GetConsumerConfigSubCommand for fetching consumer configuration #5649

@mxsm

Description

@mxsm

Feature Description

Implement the getConsumerConfig command to retrieve consumer group subscription configuration from all brokers in the cluster.

Problem/Motivation

Administrators need to:

  • View current consumer group configuration
  • Verify subscription settings across cluster
  • Compare configurations between brokers
  • Debug configuration-related issues

Proposed Solution

// rocketmq-tools/src/commands/consumer/get_consumer_config.rs

pub struct GetConsumerConfigCommand {
    admin_ext: DefaultMQAdminExt,
}

impl GetConsumerConfigCommand {
    pub async fn execute(&self, opts: GetConsumerConfigOptions) -> Result<()> {
        // Get cluster info
        // Fetch subscription group config from each broker
        // Display formatted configuration
    }
}

pub struct GetConsumerConfigOptions {
    pub group_name: String,
    pub namesrv_addr: String,
}

pub struct ConsumerConfigInfo {
    pub cluster_name: String,
    pub broker_name: String,
    pub config: SubscriptionGroupConfig,
}

Alternatives

  • Output in JSON/YAML format
  • Support config comparison across brokers

Additional Context

  • Java reference: GetConsumerConfigSubCommand.java
  • Command name: getConsumerConfig
  • Command description: "Get consumer config by subscription group name"

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions