Skip to content

[ISSUE #10793] Handle offline consumer list queries - #10794

Open
Aias00 wants to merge 2 commits into
apache:developfrom
Aias00:fix/proxy-consumer-list-offline-group
Open

[ISSUE #10793] Handle offline consumer list queries#10794
Aias00 wants to merge 2 commits into
apache:developfrom
Aias00:fix/proxy-consumer-list-offline-group

Conversation

@Aias00

@Aias00 Aias00 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make GET_CONSUMER_LIST_BY_GROUP return CONSUMER_NOT_ONLINE when the requested group has no online consumer info
  • align its behavior with GET_CONSUMER_CONNECTION_LIST in the same activity
  • add coverage for the offline-group path

Tests

  • mvn -pl proxy -Dtest=ConsumerManagerActivityTest test

Closes #10793

Copilot AI review requested due to automatic review settings August 3, 2026 13:38

Copilot 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.

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Aligns GET_CONSUMER_LIST_BY_GROUP behavior with GET_CONSUMER_CONNECTION_LIST by returning CONSUMER_NOT_ONLINE when a consumer group has no online info, and adds a regression test for that offline-group path.

Changes:

  • Return ResponseCode.CONSUMER_NOT_ONLINE early when getConsumerGroupInfo(...) returns null
  • Add a JUnit test covering the offline/missing-group scenario

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
proxy/src/main/java/org/apache/rocketmq/proxy/remoting/activity/ConsumerManagerActivity.java Adds early return with CONSUMER_NOT_ONLINE when group info is missing
proxy/src/test/java/org/apache/rocketmq/proxy/remoting/activity/ConsumerManagerActivityTest.java Adds regression test for the offline-group response code/remark

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +64 to +65
assertThat(response.getCode()).isEqualTo(ResponseCode.CONSUMER_NOT_ONLINE);
assertThat(response.getRemark()).isEqualTo("the consumer group[offline-group] not online");
Comment on lines +87 to +91
if (consumerGroupInfo == null) {
response.setCode(ResponseCode.CONSUMER_NOT_ONLINE);
response.setRemark("the consumer group[" + header.getConsumerGroup() + "] not online");
return response;
}
@codecov-commenter

codecov-commenter commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.24%. Comparing base (eddb235) to head (3485187).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...oxy/remoting/activity/ConsumerManagerActivity.java 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #10794      +/-   ##
=============================================
- Coverage      48.34%   48.24%   -0.10%     
+ Complexity     13527    13498      -29     
=============================================
  Files           1380     1380              
  Lines         101104   101143      +39     
  Branches       13107    13121      +14     
=============================================
- Hits           48882    48800      -82     
- Misses         46267    46355      +88     
- Partials        5955     5988      +33     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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] Proxy getConsumerListByGroup NPEs when consumer group is offline

3 participants