nero0912 opened a new pull request, #9429: URL: https://github.com/apache/rocketmq/pull/9429
### Motivation When the NameServer is restarted, the registered route information is lost. However, the broker does not automatically re-register itself, leading to message routing failures. This PR introduces a periodic detection mechanism in the BrokerController. If a NameServer restart is detected (e.g., through socket connection timeout or address change), the broker will trigger a full re-registration to restore routing info. ### Modifications - Added a scheduled task in `BrokerController` to detect NameServer restart. - If restart is detected, `registerBrokerAll()` is called. - Updated log messages to trace the re-registration behavior. - Minor improvements in `BrokerOuterAPI` to enhance NS address fetching logic. ### Verifying this change Tested locally: - Launched broker and namesrv - Restarted namesrv - Verified that broker re-registered automatically and topics were restored No regression observed in existing broker startup and routing behaviors. ### Does this PR introduce any user-facing change? Yes. This improves system robustness during NameServer restarts by avoiding route loss. ### Documentation No user-facing documentation update is required. -- 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]
