[ISSUE #7305] Fix metrics and transactional module not shutdown while broker offline cause coredump(#7307)

This commit is contained in:
lizhimins
2023-09-06 15:23:15 +08:00
committed by GitHub
parent d67b9d64cb
commit 37017dbaec
2 changed files with 11 additions and 1 deletions
@@ -1302,6 +1302,10 @@ public class BrokerController {
this.fastRemotingServer.shutdown();
}
if (this.brokerMetricsManager != null) {
this.brokerMetricsManager.shutdown();
}
if (this.brokerStatsManager != null) {
this.brokerStatsManager.shutdown();
}
@@ -1324,6 +1328,10 @@ public class BrokerController {
this.ackMessageProcessor.shutdownPopReviveService();
}
if (this.transactionalMessageService != null) {
this.transactionalMessageService.close();
}
if (this.notificationProcessor != null) {
this.notificationProcessor.getPopLongPollingService().shutdown();
}
@@ -629,7 +629,9 @@ public class TransactionalMessageServiceImpl implements TransactionalMessageServ
@Override
public void close() {
if (this.transactionalOpBatchService != null) {
this.transactionalOpBatchService.shutdown();
}
}
public Message getOpMessage(int queueId, String moreData) {