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 4fb0070d14aa CAMEL-24402: Fix getThreadNamePattern() returning 
unresolved #camelId# placeholder
4fb0070d14aa is described below

commit 4fb0070d14aa80b9d9ceb5b9abf7b6bd973b8bf5
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Aug 28 18:17:19 2026 +0200

    CAMEL-24402: Fix getThreadNamePattern() returning unresolved #camelId# 
placeholder
    
    The lazy thread-name-pattern init left the public getThreadNamePattern()
    getter returning the raw template with #camelId# unresolved, instead of
    resolving it like resolveThreadName() and createThreadFactory() do.
    Callers such as camel-jms's DefaultJmsMessageListenerContainer read the
    pattern through this getter and pass it straight to
    ThreadHelper.resolveThreadName(), which rejects any leftover #word#
    token, throwing IllegalArgumentException and silently failing to start
    the JMS reply listener container. This broke all JMS request/reply
    exchanges (temporary and fixed reply queues) with a 20s
    "Failed to resolve replyTo destination" timeout.
    
    Co-Authored-By: Claude Sonnet 5 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../org/apache/camel/impl/engine/BaseExecutorServiceManager.java     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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 ccaf54b31276..249777abe40c 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
@@ -137,7 +137,7 @@ public class BaseExecutorServiceManager extends 
ServiceSupport implements Execut
 
     @Override
     public String getThreadNamePattern() {
-        return threadNamePattern;
+        return resolveThreadNamePattern();
     }
 
     @Override
@@ -611,6 +611,9 @@ public class BaseExecutorServiceManager extends 
ServiceSupport implements Execut
     }
 
     protected String resolveThreadNamePattern() {
+        if (threadNamePattern == null) {
+            return null;
+        }
         return StringHelper.replaceFirst(threadNamePattern, "#camelId#", 
camelContext.getName());
     }
 

Reply via email to