mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-21 05:44:03 +08:00
[ISSUE #3949] add shutdown in ClusterMetadataService
This commit is contained in:
@@ -55,7 +55,7 @@ public class ClusterServiceManager extends AbstractStartAndShutdown implements S
|
||||
private final TopicRouteService topicRouteService;
|
||||
private final MessageService messageService;
|
||||
private final ProxyRelayService proxyRelayService;
|
||||
private final MetadataService metadataService;
|
||||
private final ClusterMetadataService metadataService;
|
||||
|
||||
private final ScheduledExecutorService scheduledExecutorService;
|
||||
private final MQClientAPIFactory messagingClientAPIFactory;
|
||||
@@ -107,6 +107,7 @@ public class ClusterServiceManager extends AbstractStartAndShutdown implements S
|
||||
this.appendStartAndShutdown(this.operationClientAPIFactory);
|
||||
this.appendStartAndShutdown(this.topicRouteService);
|
||||
this.appendStartAndShutdown(this.clusterTransactionService);
|
||||
this.appendStartAndShutdown(this.metadataService);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+6
@@ -74,6 +74,12 @@ public class ClusterMetadataService extends AbstractStartAndShutdown implements
|
||||
.maximumSize(config.getSubscriptionGroupConfigCacheMaxNum())
|
||||
.refreshAfterWrite(config.getSubscriptionGroupConfigCacheExpiredInSeconds(), TimeUnit.SECONDS)
|
||||
.build(new ClusterSubscriptionGroupConfigCacheLoader());
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
this.appendShutdown(this.cacheRefreshExecutor::shutdown);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user