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 ec7e60910a7b CAMEL-24069: camel-spring-rabbitmq - Use consumer
exception handler for async failures
ec7e60910a7b is described below
commit ec7e60910a7b7c22e7038165d39d26ffe29f15be
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Jul 15 15:25:55 2026 +0200
CAMEL-24069: camel-spring-rabbitmq - Use consumer exception handler for
async failures
When asyncConsumer=true and an exchange fails after the listener method
returns, the failure was silently dropped because
endpoint.getExceptionHandler()
is null by default. Use consumer.getExceptionHandler() instead, which always
has a default LoggingExceptionHandler.
Closes #24721
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
.../camel/component/springrabbit/EndpointMessageListener.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
a/components/camel-spring-parent/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/EndpointMessageListener.java
b/components/camel-spring-parent/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/EndpointMessageListener.java
index bd85fd309ff6..f9740674eca3 100644
---
a/components/camel-spring-parent/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/EndpointMessageListener.java
+++
b/components/camel-spring-parent/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/EndpointMessageListener.java
@@ -251,10 +251,8 @@ public class EndpointMessageListener implements
ChannelAwareMessageListener {
// method and rethrow it
exchange.setException(rce);
} else {
- // we were done async, so use the endpoint error handler
- if (endpoint.getExceptionHandler() != null) {
- endpoint.getExceptionHandler().handleException(rce);
- }
+ // we were done async, so use the consumer error handler
+ consumer.getExceptionHandler().handleException("Error
processing exchange", exchange, rce);
}
}