You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/03/28 11:38:10 UTC

(camel) branch main updated: CAMEL-20621: Single scheduled thread pool should have max queue of 1

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new b186b23b6f0 CAMEL-20621: Single scheduled thread pool should have max queue of 1
b186b23b6f0 is described below

commit b186b23b6f0291b2b42ad595b34b1d95534a703c
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Mar 28 12:36:55 2024 +0100

    CAMEL-20621: Single scheduled thread pool should have max queue of 1
---
 .../java/org/apache/camel/impl/engine/BaseExecutorServiceManager.java   | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/BaseExecutorServiceManager.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/BaseExecutorServiceManager.java
index 47a7d1885f4..9780fe60ecd 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/BaseExecutorServiceManager.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/BaseExecutorServiceManager.java
@@ -242,6 +242,8 @@ public class BaseExecutorServiceManager extends ServiceSupport implements Execut
     public ScheduledExecutorService newSingleThreadScheduledExecutor(Object source, String name) {
         ThreadPoolProfile profile = new ThreadPoolProfile(name);
         profile.setPoolSize(1);
+        profile.setMaxPoolSize(1);
+        profile.setKeepAliveTime(0L);
         profile.setAllowCoreThreadTimeOut(false);
         return newScheduledThreadPool(source, name, profile);
     }