Skip to content

Commit

Permalink
Optimized shutdown original thread pool after with proxy enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
yanhom1314 committed Oct 22, 2023
1 parent c9730b8 commit b558421
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
import java.util.Objects;
import java.util.concurrent.ThreadPoolExecutor;

import static org.dromara.dynamictp.core.support.DtpLifecycleSupport.shutdownGracefulAsync;

/**
* RocketMqDtpAdapter related
*
Expand Down Expand Up @@ -114,7 +112,7 @@ public void adaptProducerExecutors() {
if (Objects.nonNull(executor)) {
ThreadPoolExecutorProxy proxy = new ThreadPoolExecutorProxy(executor);
producer.setAsyncSenderExecutor(proxy);
shutdownGracefulAsync(executor, getTpPrefix(), 5);
shutdownOriginalExecutor(executor);

String proKey = TP_PREFIX + "#producer#" + defaultMQProducer.getProducerGroup();
executors.put(proKey, new ExecutorWrapper(proKey, proxy));
Expand Down

0 comments on commit b558421

Please sign in to comment.