fix(tools): keep the broadcast track type in messageTrackDetailConcurrent - #11071
Open
zjncs wants to merge 1 commit into
Open
fix(tools): keep the broadcast track type in messageTrackDetailConcurrent#11071zjncs wants to merge 1 commit into
zjncs wants to merge 1 commit into
Conversation
…rent The serial messageTrackDetail maps MQClientException with BROADCAST_CONSUMPTION to TrackType.CONSUME_BROADCASTING, but the concurrent variant only handled CONSUMER_NOT_ONLINE, so broadcast consumer groups were reported as UNKNOWN with an error description. Mirror the serial mapping in both catches of the concurrent track task. Signed-off-by: zjncs <18910855655@163.com>
RockteMQ-AI
approved these changes
Sep 8, 2026
RockteMQ-AI
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Changes look good.
Automated review by github-manager-bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The serial
messageTrackDetailmaps the broadcast case to a proper track type:but the concurrent variant (
messageTrackDetailConcurrent, exposed viaMQAdminExt.messageTrackDetailConcurrent) only handlesCONSUMER_NOT_ONLINEin its catch blocks. For a broadcast consumer group,consumed()→examineConsumeStatsthrowsMQClientException(ResponseCode.BROADCAST_CONSUMPTION, ...), so the concurrent API reports the group asTrackType.UNKNOWNwith a raw error string, while the serial API correctly reportsCONSUME_BROADCASTING— contradicting the sibling implementation and misleading dashboards that use the concurrent API.Modifications
Add the same
BROADCAST_CONSUMPTION → CONSUME_BROADCASTINGmapping to both catches of the concurrent track task.Verification
Fail-before (new test
testMessageTrackDetailConcurrentWithBroadcastGroup, run against the unpatched code — a passive consumer group whose connection reportsMessageModel.BROADCASTING, soexamineConsumeStatsthrowsBROADCAST_CONSUMPTIONthrough the natural path):Pass-after:
Note: the pre-existing
testMessageTrackDetailConcurrent(andtestConsumeMessageDirectly) fail in my local container on JDK 21 withMockito cannot mock this class: java.net.InetAddress— verified to fail identically on a clean develop checkout (before my changes), so this is an environment limitation, not a regression of this PR.