yuluo-yx opened a new issue, #2903: URL: https://github.com/apache/rocketmq-dashboard/issues/2903
### Problem\nWhen brokerId 0 is absent, selects the first non-null value from a . HashMap iteration order is not a broker preference, so a broker with multiple available slave addresses can map to a different endpoint as the map layout changes. This creates unstable topology and cache/diff targets during master outages.\n\n### Reproduction\nReturn a broker address table with slave broker IDs 32 and 1, without brokerId 0. The current code selects the hash-iteration-first ID 32 address rather than a defined fallback.\n\n### Expected behavior\nAddress selection is deterministic: prefer master, otherwise choose the available address with the lowest brokerId.\n\n### Proposed fix\nSelect the minimum non-null brokerId entry and add a regression test for a masterless broker. -- 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]
