luigidemasi commented on code in PR #13403: URL: https://github.com/apache/camel/pull/13403#discussion_r1518555101
########## components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPConfiguration.java: ########## @@ -51,4 +64,28 @@ public void setIncludeAmqpAnnotations(boolean includeAmqpAnnotations) { this.includeAmqpAnnotations = includeAmqpAnnotations; } + public static class CamelAmqpTemplate extends CamelJmsTemplate { + + public CamelAmqpTemplate(AMQPConfiguration config, ConnectionFactory connectionFactory) { + super(config, connectionFactory); + } + + @Override + protected void commitIfNecessary(Session session) throws JMSException { + //# CAMEL-20521 - we can't use JmsUtils.commitIfNecessary because it catches + // jakarta.jms.IllegalStateException that can be thrown if the session is closed Review Comment: It leads to a redelivery if configured, this fix allows the exception to bubble up and can be handled by the error handler. At the moment the exception is stopped at `org.springframework.jms.support.JmsUtils.commitIfNecessary`, not even logged at trace level, so the camel route continue on the normal flow, like the commit has ended successfully. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org