mirror of
https://github.com/apache/rocketmq.git
synced 2026-10-25 10:03:57 +08:00
BrokerContainer.initialize() schedules the name-server refresh and the five-second brokerOuterAPI.refreshMetadata() task on scheduledExecutorService, and shutdown() stops the brokers, both remoting servers, the request executor and the outer API - but not that scheduler. A shut-down container therefore keeps refreshing metadata through an API it has already closed, logging "ScheduledTask refresh metadata exception" every five seconds, and leaks the scheduler thread on every start/shutdown cycle. Stop it before the API is closed, the way the request executor next to it is stopped.