This commit is contained in:
@@ -1016,6 +1016,13 @@ public final class Application {
|
||||
if (clusterAgent != null) {
|
||||
clusterAgent.destroy(clusterAgent.getConfig());
|
||||
}
|
||||
if (this.messageAgents != null) {
|
||||
long s = System.currentTimeMillis();
|
||||
for (MessageAgent agent : this.messageAgents) {
|
||||
agent.destroy(agent.getConfig());
|
||||
}
|
||||
logger.info(this.getClass().getSimpleName() + " MessageAgent destroy in " + (System.currentTimeMillis() - s) + " ms\r\n");
|
||||
}
|
||||
for (DataSource source : dataSources) {
|
||||
if (source == null) continue;
|
||||
try {
|
||||
|
||||
@@ -91,6 +91,8 @@ public abstract class MessageAgent {
|
||||
}
|
||||
|
||||
public void destroy(AnyValue config) {
|
||||
if (this.sncpRespConsumer != null) this.sncpRespConsumer.shutdown().join();
|
||||
if (this.producer != null) this.producer.shutdown().join();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
||||
Reference in New Issue
Block a user