Subscription callback thread pool parameter changes (#475)

pull/476/head
chen.ma 2 years ago
parent 41ff8f1c1b
commit 1134bbfd23

@ -175,12 +175,11 @@ public final class DynamicThreadPoolPostProcessor implements BeanPostProcessor {
} }
private final ExecutorService configRefreshExecutorService = ThreadPoolBuilder.builder() private final ExecutorService configRefreshExecutorService = ThreadPoolBuilder.builder()
.corePoolSize(2) .corePoolSize(1)
.maxPoolNum(4) .maxPoolNum(2)
.keepAliveTime(2000) .keepAliveTime(2000)
.timeUnit(TimeUnit.MILLISECONDS) .timeUnit(TimeUnit.MILLISECONDS)
.workQueue(QueueTypeEnum.ARRAY_BLOCKING_QUEUE) .workQueue(QueueTypeEnum.SYNCHRONOUS_QUEUE)
.capacity(1024)
.allowCoreThreadTimeOut(true) .allowCoreThreadTimeOut(true)
.threadFactory("client.dynamic.threadPool.change.config") .threadFactory("client.dynamic.threadPool.change.config")
.rejected(new ThreadPoolExecutor.AbortPolicy()) .rejected(new ThreadPoolExecutor.AbortPolicy())

Loading…
Cancel
Save