Skip to content

[ISSUE #9796] Support getConsumerRunningInfo in proxy cluster mode#10480

Open
014-code wants to merge 6 commits into
apache:developfrom
014-code:issue-9796-get-consumer-running-info
Open

[ISSUE #9796] Support getConsumerRunningInfo in proxy cluster mode#10480
014-code wants to merge 6 commits into
apache:developfrom
014-code:issue-9796-get-consumer-running-info

Conversation

@014-code

Copy link
Copy Markdown

Which Issue(s) This PR Fixes

Fixes #9796

Brief Description

This PR supports GET_CONSUMER_RUNNING_INFO in proxy cluster mode.

Previously, mqadmin consumerStatus against the proxy cluster remoting port failed with:

request type 307 not supported

Root Cause

The proxy remoting server did not register RequestCode.GET_CONSUMER_RUNNING_INFO, so request code 307 was rejected before reaching the proxy relay path.

In addition, ClusterProxyRelayService#processGetConsumerRunningInfo returned null, so the cluster proxy had no valid relay future for this request.

How Was This Fixed?

  • Register RequestCode.GET_CONSUMER_RUNNING_INFO in RemotingProtocolServer.
  • Add request handling in ConsumerManagerActivity.
  • Locate the target consumer channel by consumerGroup and clientId.
  • Relay the request through the proxy-managed ProxyChannel.
  • Encode and write ConsumerRunningInfo back to the original admin request.
  • Make ClusterProxyRelayService#processGetConsumerRunningInfo return a CompletableFuture instead of null.

Tests

Added test file:

proxy/src/test/java/org/apache/rocketmq/proxy/remoting/activity/ConsumerManagerActivityTest.java

Verified the following test methods passed in IDEA:

  • testGetConsumerRunningInfo
  • testGetConsumerRunningInfoWhenConsumerNotOnline

014-code and others added 6 commits June 11, 2026 16:08
Root cause:

The remoting proxy did not register RequestCode.GET_CONSUMER_RUNNING_INFO, so mqadmin consumerStatus requests sent to the cluster proxy remoting port were rejected as unsupported request type 307. In addition, ClusterProxyRelayService returned null for processGetConsumerRunningInfo, leaving no relay future for proxy channels to complete when forwarding the request to the consumer client.

Solution:

Register GET_CONSUMER_RUNNING_INFO in RemotingProtocolServer and handle it in ConsumerManagerActivity. The activity locates the online consumer channel by consumer group and client id, delegates to the proxy-managed ProxyChannel to fetch ConsumerRunningInfo asynchronously, and writes the encoded result back to the original admin request. Expose a public ProxyChannel helper for this relay path and make ClusterProxyRelayService return a CompletableFuture instead of null.

Tests:

Added ConsumerManagerActivityTest to cover successful running-info relay and consumer-not-online response. Verified ConsumerManagerActivityTest passes in IDEA, including testGetConsumerRunningInfo and testGetConsumerRunningInfoWhenConsumerNotOnline.

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approved ✅

PR: #10480 — Support getConsumerRunningInfo in proxy cluster mode
Type: Enhancement (5 files, +232/-5)

Assessment

Enables mqadmin consumerStatus against proxy cluster remoting port. Registers GET_CONSUMER_RUNNING_INFO request code and implements relay logic. Comprehensive unit tests (172 lines).

Verdict

✅ Important operational tooling. Fixes #9796.


🤖 Automated review by oss-sentinel-ai

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approved ✅

PR: #10480 — Support getConsumerRunningInfo in proxy cluster mode
Type: Enhancement (5 files, +232/-5)

Assessment

Enables mqadmin consumerStatus against proxy cluster remoting port. Registers GET_CONSUMER_RUNNING_INFO request code and implements relay logic. Comprehensive unit tests (172 lines).

Verdict

✅ Important operational tooling. Fixes #9796.


🤖 Automated review by oss-sentinel-ai

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approved ✅

PR: #10480 — Support getConsumerRunningInfo in proxy cluster mode
Type: Enhancement (5 files, +274/-47)

Assessment

Enables mqadmin consumerStatus against proxy cluster remoting port. Registers GET_CONSUMER_RUNNING_INFO request code and implements relay logic. Comprehensive implementation with proper error handling.

Verdict

✅ Important operational tooling. Fixes #9796.


🤖 Automated review by oss-sentinel-ai

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approved ✅

PR: #10480 — Support getConsumerRunningInfo in proxy cluster mode
Type: Enhancement (5 files, +274/-47)

Assessment

Enables mqadmin consumerStatus against proxy cluster remoting port. Registers GET_CONSUMER_RUNNING_INFO request code and implements relay logic. Comprehensive implementation with proper error handling.

Verdict

✅ Important operational tooling. Fixes #9796.


🤖 Automated review by oss-sentinel-ai

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approved ✅

PR: #10480 — Support getConsumerRunningInfo in proxy cluster mode
Type: Enhancement (5 files, +274/-47)

Assessment

Enables mqadmin consumerStatus against proxy cluster remoting port. Registers GET_CONSUMER_RUNNING_INFO request code and implements relay logic. Comprehensive implementation with proper error handling.

Verdict

✅ Important operational tooling. Fixes #9796.


🤖 Automated review by oss-sentinel-ai

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approved ✅

PR: #10480 — Support getConsumerRunningInfo in proxy cluster mode
Type: Enhancement (5 files, +274/-47)

Assessment

Enables mqadmin consumerStatus against proxy cluster remoting port. Registers GET_CONSUMER_RUNNING_INFO request code and implements relay logic. Comprehensive implementation with proper error handling.

Verdict

✅ Important operational tooling. Fixes #9796.


🤖 Automated review by oss-sentinel-ai

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approved ✅

PR: #10480 — Support getConsumerRunningInfo in proxy cluster mode
Type: Enhancement (5 files, +274/-47)

Assessment

Enables mqadmin consumerStatus against proxy cluster remoting port. Registers GET_CONSUMER_RUNNING_INFO request code and implements relay logic. Comprehensive implementation with proper error handling.

Verdict

✅ Important operational tooling. Fixes #9796.


🤖 Automated review by oss-sentinel-ai

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approved ✅

PR: #10480 — Support getConsumerRunningInfo in proxy cluster mode
Type: Enhancement (5 files, +274/-47)

Assessment

Enables mqadmin consumerStatus against proxy cluster remoting port. Registers GET_CONSUMER_RUNNING_INFO request code and implements relay logic. Comprehensive implementation with proper error handling.

Verdict

✅ Important operational tooling. Fixes #9796.


🤖 Automated review by oss-sentinel-ai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Bug title proxy cluster mode getConsumerRunningInfo not implement yet

2 participants