beautyarbutin opened a new pull request, #11193: URL: https://github.com/apache/rocketmq/pull/11193
### Which Issue(s) This PR Fixes - Fixes #11187 ### Brief Description `TopicRouteWrapper#getMasterAddr` and `getMasterAddrPrefer` dereferenced the result of the broker-name lookup without checking whether the broker group was still present in the latest route data. A stale order-topic entry or queue entry could therefore make route construction fail with an NPE after a broker group went offline. Both lookups now return `null` when the broker group is absent. `MessageQueueSelector` already treats a null address as unavailable, so it skips the offline broker while preserving queues for the remaining online brokers. Regression tests cover both read-route construction and static order-topic write-route construction with a missing broker group. ### How Did You Test This Change? Before the implementation change, the new order-topic regression failed with a `NullPointerException` in `testOrderMessageQueueSkipsMissingBrokerData`. ```shell mvn -pl proxy -am -DskipITs -Dtest=MessageQueueSelectorTest -Dsurefire.failIfNoSpecifiedTests=false test ``` Result: all 12 reactor modules succeeded, 4 tests passed, Checkstyle reported 0 violations, and SpotBugs reported no errors or warnings. -- 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]
