Skip to content

Commit 508579b

Browse files
committed
fix thread lead with rocketmq consumer start and shutdown frequently
1 parent 36036da commit 508579b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

eventmesh-storage-plugin/eventmesh-storage-rocketmq/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ public void start() {
106106

107107
@Override
108108
public void shutdown(long awaitTerminateMillis) {
109-
109+
this.scheduledExecutorService.shutdown();
110+
org.apache.rocketmq.common.utils.ThreadUtils.shutdownGracefully(this.consumeExecutor, awaitTerminateMillis, TimeUnit.MILLISECONDS);
111+
this.cleanExpireMsgExecutors.shutdown();
110112
}
111113

112114
public void shutdown() {

0 commit comments

Comments
 (0)