jokerzsd opened a new pull request, #4205: URL: https://github.com/apache/rocketmq-dashboard/pull/4205
## Summary Fix message-id query returning no rows when the broker registers by hostname instead of an IP address. ## Problem `BrokerTopologyGuards` compared the IP embedded in an offset `msgId` (from `decodedBrokerAddr`) directly against the broker addresses registered with the NameServer (`knownBrokerEndpoints`). When a broker registered by hostname (e.g. `repro-hostname-broker:10911`), the guard misclassified the embedded IP as off-cluster and rejected the lookup, so the message-id query returned zero rows even though the message existed and the official SDK could read it. ## Fix Also register the resolved `ip:port` form of each known broker endpoint in `knownBrokerEndpoints`, so the embedded-IP comparison matches hostname-registered brokers. Plain-IP brokers are unchanged. ## Test plan Added `BrokerTopologyGuardsTest` (JUnit 5 + Mockito) covering: - a hostname-registered broker exposes both the hostname and the resolved IP; - a plain-IP broker is kept unchanged. Verified with `mvn test -Dtest=BrokerTopologyGuardsTest` (Java 21, `Tests run: 2, Failures: 0`). Fixes #4181 -- 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]
