This is an automated email from the ASF dual-hosted git repository. lizhimin pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push: new 61f50b0fa0 [ISSUE #9360] Fix some services are not shutdown when the broker offline (#9361) 61f50b0fa0 is described below commit 61f50b0fa04a39ae9242c7e5135bdf079ca7f62a Author: lizhimins <707364...@qq.com> AuthorDate: Wed Apr 23 13:50:08 2025 +0800 [ISSUE #9360] Fix some services are not shutdown when the broker offline (#9361) --- .../apache/rocketmq/broker/BrokerController.java | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java index c6163499a9..2616e039e8 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java +++ b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java @@ -1454,10 +1454,19 @@ public class BrokerController { this.popConsumerService.shutdown(); } - { + if (this.popMessageProcessor.getPopLongPollingService() != null) { this.popMessageProcessor.getPopLongPollingService().shutdown(); + } + + if (this.popMessageProcessor.getQueueLockManager() != null) { this.popMessageProcessor.getQueueLockManager().shutdown(); + } + + if (this.popMessageProcessor.getPopBufferMergeService() != null) { this.popMessageProcessor.getPopBufferMergeService().shutdown(); + } + + if (this.ackMessageProcessor.getPopReviveServices() != null) { this.ackMessageProcessor.shutdownPopReviveService(); } @@ -1572,7 +1581,7 @@ public class BrokerController { } if (this.escapeBridge != null) { - escapeBridge.shutdown(); + this.escapeBridge.shutdown(); } if (this.topicRouteInfoManager != null) { @@ -1609,8 +1618,13 @@ public class BrokerController { this.consumerOffsetManager.stop(); } - if (null != configStorage) { - configStorage.shutdown(); + if (this.consumerOrderInfoManager != null) { + this.consumerOrderInfoManager.persist(); + this.consumerOrderInfoManager.shutdown(); + } + + if (this.configStorage != null) { + this.configStorage.shutdown(); } if (this.authenticationMetadataManager != null) {