[ISSUE #10671] Improve unsupported client type diagnostics - #10742
Open
twei43846-afk wants to merge 1 commit into
Open
[ISSUE #10671] Improve unsupported client type diagnostics#10742twei43846-afk wants to merge 1 commit into
twei43846-afk wants to merge 1 commit into
Conversation
RockteMQ-AI
approved these changes
Aug 1, 2026
RockteMQ-AI
left a comment
Contributor
There was a problem hiding this comment.
Review by github-manager-bot
Summary
Improves diagnostics when the Proxy gRPC layer rejects an unsupported client type in heartbeat and client termination requests. Adds a helper method that produces a descriptive error message listing supported types, and covers both paths with unit tests.
Findings
- [Info]
ClientActivity.java:127-128— Addinglog.warnfor unsupported client types in bothheartbeatandnotifyClientTerminationis valuable for operational debugging. Good addition. - [Info]
ClientActivity.java:202-205— ThebuildUnsupportedClientTypeStatushelper reduces duplication and produces a much more informative error message. The message clearly tells the client what went wrong and which types are supported. - [Info]
ClientActivityTest.java— Tests cover both the heartbeat and termination paths withCLIENT_TYPE_UNSPECIFIED, verifying both the error code and the message content. Good coverage.
Minor Observations
- The hardcoded list of supported types in the error message (
PRODUCER, PUSH_CONSUMER, SIMPLE_CONSUMER, LITE_PUSH_CONSUMER, LITE_SIMPLE_CONSUMER) could become stale if new client types are added to the enum. Consider deriving it from theClientTypeenum or a constant in the future. This is a minor concern and acceptable for now.
Assessment
Clean improvement that significantly improves debuggability for clients connecting with unsupported types. Well-tested.
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.
Summary
UNRECOGNIZED_CLIENT_TYPEstatus message when Proxy gRPC heartbeat rejects an unsupported client type.ClientActivityTestcoverage for both paths.Motivation
Fixes #10671.
The previous response only echoed the enum name, for example
CLIENT_TYPE_UNSPECIFIED, which does not explain why the Proxy rejected the client or which client types are accepted. This keeps the behavior compatible while making the rejection reason visible to clients and adding a Proxy-side warning log.Tests
git diff --checkmvn -Dmaven.repo.local=$env:USERPROFILE\.m2\repository -pl proxy -am -Dtest=ClientActivityTest -DfailIfNoTests=false testResult:
ClientActivityTestpassed with 17 tests. The local JDK17 run emitted existing JaCoCo 0.8.5 instrumentation warnings for class file version 61, but Maven exited successfully and surefire reports 0 failures / 0 errors.