Hi, Recently, we have updated artemis dependencies from 2.24.0 to latest 2.28.0 in our project. After the update we came upon a problem - we started noticing exceptions being printed out in logs after JmsTemplate message send.
Particular exception thrown: [main] DEBUG org.apache.activemq.artemis.core.client.impl.ClientSessionImpl - Calling close on session ClientSessionImpl [name=a3a3ffc2-b73f-11ed-af77-e86a64f1df39, username=artemis, closed=false, factory = org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl@13b3d178, metaData=(jms-session=,)]@2fc0cc3 [main] DEBUG org.apache.activemq.artemis.core.client.impl.ClientSessionImpl - calling cleanup on ClientSessionImpl [name=a3a3ffc2-b73f-11ed-af77-e86a64f1df39, username=artemis, closed=false, factory = org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl@13b3d178, metaData=(jms-session=,)]@2fc0cc3 at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connectionDestroyed(ClientSessionFactoryImpl.java:383) at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector$Listener$1.run(NettyConnector.java:1214) at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:58) at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:33) at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:69) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [main] DEBUG org.apache.activemq.artemis.core.client.impl.ClientSessionImpl - Session was already closed, giving up now, this=ClientSessionImpl [name=a3a3ffc2-b73f-11ed-af77-e86a64f1df39, username=artemis, closed=true, factory = org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl@13b3d178, metaData=(jms-session=,)]@2fc0cc3 Started to investigate the root cause of the problem. We thought it was something to do with our configuration, however after creating a new demo project with default settings and starting a freshly insalled artemis broker it still seems to printout the exception after message send. <bean id="connectionFactory" class="org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory"> <property name="user" value="artemis"/> <property name="password" value="artemis"/> <property name="brokerURL" value="tcp://localhost:61616" /> </bean> <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate"> <property name="connectionFactory" ref="connectionFactory" /> </bean> After checking why the exception was not thrown in 2.24.0 compared to 2.28.0, it seems that the exception is actually thrown in the background, just not printed out for DEBUG as in 2.28.0. As of https://github.com/apache/activemq-artemis/commit/9873fccf744c0cb0a25dd905fab67ea52ef7aa7d commit it changes the logging from TRACE to DEBUG in org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl#failoverOrReconnect which I assume logs it. Message is sent and received correctly, it seems nothing breaks in the end, just that the exception is thrown after cleaning up the session. Questions would be: Is the exception thrown just used for logging and should we just skip it? Is there some other problem we are facing which needs to be fixed so that the exception is not thrown after session close? Thanks in advance! This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged. If you are not one of the named recipients or have received this email in error, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this email and all attachments, (iii) Dassault Systèmes does not accept or assume any liability or responsibility for any use of or reliance on this email. Please be informed that your personal data are processed according to our data privacy policy as described on our website. Should you have any questions related to personal data protection, please contact 3DS Data Protection Officer https://www.3ds.com/privacy-policy/contact/