unbridled-41 opened a new issue, #4258:
URL: https://github.com/apache/rocketmq-dashboard/issues/4258

   [Studio][Bug] Consumer group subscriptions and progress return 502 for 
offline and broadcast groups
   
   ## Problem
   
   On the Apache vendor path, two ordinary business states of a consumer group 
make the group detail drawer fail with an HTTP 502 instead of showing empty 
live data:
   
   - **Group whose clients have all disconnected** (consumer stopped, app 
restarted): `GET .../groups/{group}/subscriptions` -> 
`RocketMQMetadataProvider.getGroupSubscriptions` -> 
`DefaultMQAdminExt.examineConsumerConnectionInfo` -> **502 "Failed to get 
subscriptions for group X: CODE: 206  DESC: Not found the consumer group 
connection ..."**
   - **Broadcast-mode group**: `GET .../groups/{group}/progress` -> 
`getGroupProgress` -> `examineConsumeStats` -> **502 "Failed to get progress 
for group X: CODE: 213  DESC: Not found the consumer group consume stats, 
because return offset table is empty, the consumer is under the broadcast mode 
..."**
   
   ## Evidence
   
   - rocketmq-tools 5.5.0 bytecode (`DefaultMQAdminExtImpl`): 
`examineConsumerConnectionInfo` throws `MQClientException(206, "Not found the 
consumer group connection")` when the broker returns an empty connection set; 
`examineConsumeStats` throws `MQClientException(213, "... the consumer is under 
the broadcast mode")` for broadcast groups with an empty offset table.
   - `RocketMQMetadataProvider.isGroupNotOnline` 
(RocketMQMetadataProvider.java:726-733 at 6c24d2ed) only matches 
`MQBrokerException(CONSUMER_NOT_ONLINE)` or a message containing `"not online"` 
- neither tool-thrown variant matches, so both fall through to 
`BusinessException(502, ...)`.
   - Two new regression tests in `RocketMQMetadataProviderTest` are red on 
current code with exactly the 502 outputs above 
(`getGroupSubscriptionsShouldReturnEmptyWhenClientReportsGroupOfflineTest`, 
`getGroupProgressShouldReturnEmptyForBroadcastGroupTest`).
   
   ## Impact
   
   Stopping a consumer or using broadcast consumption is enough to break the 
subscriptions/progress tabs of the consumer group drawer with an opaque 502, 
even though the group exists and "no live data" is the correct answer.
   
   ## Expected behavior
   
   Both states should be graded like the existing not-online branch: return 
empty results (subscriptions may still consult the proxy fallback first, as the 
current not-online path does).
   
   ## Related work
   
   - #4006 / merged fix: the same exception family was graded to empty results 
in `RocketMQClientProvider` (`isGroupConnectionAbsent`, which also matches the 
message "Not found the consumer group connection"); the drifted copy in 
`RocketMQMetadataProvider` was missed.
   
   ## PR
   
   Fix incoming.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to