Claus Ibsen created CAMEL-24083:
-----------------------------------

             Summary: camel-sjms - asyncConsumer failures are silently dropped 
(same bug as CAMEL-24069)
                 Key: CAMEL-24083
                 URL: https://issues.apache.org/jira/browse/CAMEL-24083
             Project: Camel
          Issue Type: Bug
          Components: camel-sjms
            Reporter: Claus Ibsen


The same bug as CAMEL-24069 (camel-spring-rabbitmq) also exists in camel-sjms.

In {{EndpointMessageListener.EndpointMessageListenerAsyncCallback.done()}} 
(camel-sjms), the async failure path calls {{endpoint.getExceptionHandler()}} 
which is {{null}} by default, with no fallback:

{code:java}
if (endpoint.getExceptionHandler() != null) {
    endpoint.getExceptionHandler().handleException(rce);
}
{code}

Since {{DefaultEndpoint.exceptionHandler}} is never initialized to a default 
value, the exception is silently dropped when no explicit {{exceptionHandler}} 
is configured on the endpoint.

The fix should use {{consumer.getExceptionHandler()}} instead, which always has 
a default {{LoggingExceptionHandler}} (set by {{DefaultConsumer}} constructor). 
This matches the canonical pattern used by 
{{DefaultConsumer.DefaultConsumerCallback}} and other components like 
camel-pulsar.

File: 
{{components/camel-sjms/src/main/java/org/apache/camel/component/sjms/consumer/EndpointMessageListener.java}}
 (lines 459-461)

----
_This issue was found during investigation of CAMEL-24069: Claude Code on 
behalf of davsclaus._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to