[ISSUE #786] Return unavailable for consumer group providers - #787
Merged
lizhimins merged 1 commit intoAug 4, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens the default Consumer Group provider/admin stubs so /api/groups operations fail with an explicit BusinessException(501, ...) (“not configured”) instead of UnsupportedOperationException, allowing the global exception handler to return HTTP 501 rather than a generic 500.
Changes:
- Update
CloudMetadataProviderConsumer Group query methods to throwBusinessException(501, ...)when no provider is configured. - Update
NameSrvAdminClientConsumer Group admin methods to throwBusinessException(501, ...)when no admin client is configured. - Add focused unit tests verifying the new 501 behavior and message for both default implementations.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| server/src/main/java/org/apache/rocketmq/studio/instance/topic/NameSrvAdminClient.java | Switch Consumer Group admin operations from UnsupportedOperationException to BusinessException(501, ...) for clearer API behavior. |
| server/src/main/java/org/apache/rocketmq/studio/instance/topic/CloudMetadataProvider.java | Switch Consumer Group metadata operations from UnsupportedOperationException to BusinessException(501, ...) for clearer API behavior. |
| server/src/test/java/org/apache/rocketmq/studio/instance/topic/NameSrvAdminClientTest.java | Add assertions that default admin client returns BusinessException with code 501 + expected message for Consumer Group operations. |
| server/src/test/java/org/apache/rocketmq/studio/instance/topic/CloudMetadataProviderTest.java | Add assertions that default metadata provider returns BusinessException with code 501 + expected message for Consumer Group operations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Aug 4, 2026
Closed
lizhimins
force-pushed
the
fix/studio-consumer-group-unavailable
branch
from
August 4, 2026 10:03
c5345dc to
815f451
Compare
1 task
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.
Which Issue(s) This PR Fixes
Fixes #786
Brief Description
The default Consumer Group metadata/admin implementations now return explicit
BusinessException(501, ...)responses when the backing provider is not configured, instead of throwing plainUnsupportedOperationExceptionand surfacing as generic 500 errors.This keeps the current Topic paths untouched and only changes Consumer Group operations used by
/api/groups.How Did You Test This Change?
JAVA_HOME=/Users/aias/Library/Java/JavaVirtualMachines/openjdk-21.0.2/Contents/Home mvn -Dtest=CloudMetadataProviderTest,NameSrvAdminClientTest,MetadataServiceTest testJAVA_HOME=/Users/aias/Library/Java/JavaVirtualMachines/openjdk-21.0.2/Contents/Home mvn -Dtest=ConsumerGroupControllerTest test