unbridled-41 opened a new pull request, #4261: URL: https://github.com/apache/rocketmq-dashboard/pull/4261
Fixes #4260. ## Problem / Evidence On the Apache vendor path, `RocketMQAdminClientImpl` treats two ordinary group states as hard failures: - **Group created but never connected** (no clients yet, so `%RETRY%<group>` has no route): the group detail endpoint (`MetadataService.getConsumerGroup` → `RocketMQAdminClientImpl.getConsumerGroup`) returns **502 "Failed to get consumer group: CODE: 17 DESC: No topic route info in name server for the topic: %RETRY%<group> ..."**. Creating a consumer group in Studio and immediately opening its detail hits this 100% of the time. - **Reset-offset preview for that group, or for a broadcast-mode group**: returns **500 "Failed to preview reset offset: CODE: 17/213 DESC: ..."** — blocking the preview-first reset flow. Bytecode basis (rocketmq-tools 5.5.0): `examineConsumerConnectionInfo`/`examineConsumeStats` locate the group through `MixAll.getRetryTopic(group)` via `examineTopicRouteInfo` → `MQClientAPIImpl.getTopicRouteInfoFromNameServer`, which throws `MQClientException(TOPIC_NOT_EXIST=17, nameserver remark "No topic route info in name server for the topic: ...")`; a broadcast group's empty offset table throws `MQClientException(BROADCAST_CONSUMPTION=213, "... the consumer is under the broadcast mode")`. Root cause: `isConsumerNotOnline` (RocketMQAdminClientImpl.java:234-241 at 6c24d2ed) only matched `MQBrokerException(CONSUMER_NOT_ONLINE)` or messages containing `"not online"` / `"CODE: 206"` — neither variant matches. ## Root cause / Fix `isConsumerNotOnline` now also grades `BROADCAST_CONSUMPTION` and a `TOPIC_NOT_EXIST` whose message names the group's `%RETRY%` topic (via `MqResponseCodes.hasResponseCode`) as not-online states. `getConsumerGroup` then keeps its existing offline semantics (proxy fallback, then zero defaults); `doPreviewResetOffset` returns its existing empty "not online" preview. ## Priority & scoring PRIORITY 74 = 影响 30(Studio 内创建消费组后立即打开详情 100% 得 502;重置位点预览对未连接/广播组 500,阻断 preview-first 流程)+ 波及 13(消费组详情与重置预览两个端点)+ 可复现 18(新建组即触发,确定性)+ 维护价值 13(#4006 孪生家族第三处漂移副本,ensureRetryTopicExists javadoc 已自证该失败模式)。FIX_CONFIDENCE 88:字节码级证实异常形态与消息文本,同文件已有 not-online 分级语义。 ## Tests - New regressions (red on 6c24d2ed, actual output): `getConsumerGroupReturnsOfflineDetailForGroupWithoutRetryRouteTest` → `Failed to get consumer group: CODE: 17 DESC: No topic route info in name server for the topic: %RETRY%orders`; `previewResetOffsetShouldReturnEmptyPreviewForGroupWithoutRetryRouteTest` → `Failed to preview reset offset: CODE: 17 DESC: ... %RETRY%cg-orders`; `previewResetOffsetShouldReturnEmptyPreviewForBroadcastGroupTest` → `Failed to preview reset offset: CODE: 213 DESC: ... the consumer is under the broadcast mode`. Summary `Tests run: 49, Failures: 0, Errors: 3`; all three assert the offline/empty shapes and pass after the fix. - Module suite: `RocketMQAdminClientImplTest` 49/49, `RocketMQMetadataProviderTest` 40/40, `RocketMQClientProviderTest` 27/27, `MetadataServiceTest` 36/36 = **152/152**. - Full backend suite on this branch (`mvn -o test`): **2154 tests, 3 failures** = the pristine 6c24d2ed baseline set (AuthCorsIntegrationTest ×2 + load-fragile `OpenAiCompatibleLlmGatewayTest.successfulAndFailedStreamsEmitOneTerminalSequence`); 2154 = baseline 2151 + 3 new regressions. Zero new failures. ## Risk Low: the predicate only widens the not-online grading; the `%RETRY%` message guard keeps unrelated TOPIC_NOT_EXIST failures (e.g. a reset target topic without a route, surfaced through other calls) outside the grading. Genuine broker failures still throw (existing admin-failure tests stay green). The empty preview's reason string says "not online" for broadcast groups too — the shown state (no offset data) is correct; the wording is kept minimal. -- 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]
