RockteMQ-AI commented on issue #11477: URL: https://github.com/apache/rocketmq/issues/11477#issuecomment-6308500863
**Issue Evaluation** Category: `type/bug` | Status: **Confirmed** The reported issue has been analyzed. The description clearly shows that `BrokerContainer.initialize()` schedules periodic metadata refresh tasks but `shutdown()` never stops the scheduler, causing resource leaks. **Root Cause:** The `scheduledExecutorService` created in `initialize()` is not shut down in the `shutdown()` method, leaving periodic tasks running against a closed `brokerOuterAPI`. **Impact:** Each broker container restart leaks a scheduler thread that continuously logs errors every 5 seconds. In long-running deployments with frequent restarts, this accumulates leaked threads. **Severity:** Medium - Resource leak that can cause thread accumulation and continuous error logging, but does not affect message processing directly. **Related Issues:** This follows the same pattern as #11427 and #11456, suggesting a systematic issue with lifecycle management. **Next Steps:** This issue requires adding scheduler shutdown to the `shutdown()` method. An automated fix proposal can be generated if the community confirms. Reply `/approve` to proceed with PR generation, or provide feedback if needed. --- *Automated evaluation by RockteMQ-AI* -- 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]
