Skip to content

Commit ec7e609

Browse files
davsclausclaude
andauthored
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 <noreply@anthropic.com>
1 parent 2831196 commit ec7e609

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

components/camel-spring-parent/camel-spring-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/EndpointMessageListener.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,8 @@ public void done(boolean doneSync) {
251251
// method and rethrow it
252252
exchange.setException(rce);
253253
} else {
254-
// we were done async, so use the endpoint error handler
255-
if (endpoint.getExceptionHandler() != null) {
256-
endpoint.getExceptionHandler().handleException(rce);
257-
}
254+
// we were done async, so use the consumer error handler
255+
consumer.getExceptionHandler().handleException("Error processing exchange", exchange, rce);
258256
}
259257
}
260258

0 commit comments

Comments
 (0)