zhfeng commented on code in PR #13403:
URL: https://github.com/apache/camel/pull/13403#discussion_r1518442503


##########
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:
   I'm not sure why this can fix CAMEL-20521 when session is closed during the 
commit? It will lead to the re-connecting?



-- 
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

Reply via email to