-
Bug
-
Resolution: Done
-
Major
-
None
-
AMQ 7.1.0.GA
-
None
An application uses a long-lived Spring JMSTemplate instance to send messages to AMQ 7.1. After a network outage of significant duration (minutes) the application is seen to continue to use the stale TCP connection to the broker.
Caused by: javax.jms.JMSException: AMQ119014: Timed out after waiting 30,000 ms for response when sending packet 71
at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:401) ~[artemis-core-client-2.0.0.amq-700011-redhat-1.jar:2.0.0.amq-700011-redhat-1]
...
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466) ~[spring-jms-3.2.3.RELEASE.jar:3.2.3.RELEASE]
Under the Spring JMSTemplate is a Spring CachingConnectionFactory (which extends SingleConnectionFactory) which wraps the ActiveMQConnectionFactory. We can see that the Spring SCF code calls setExceptionHandler() on the broker connection – see line 421:
https://github.com/spring-projects/spring-framework/blob/master/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java
However, the Artemis client runtime never seems to call the registered exception listener, and the Spring infrastructure does not respond to connection failure. Thus the client continues to use a stale connection.
- is related to
-
ENTMQBR-2493 Core-JMS -- exception listener is not invoked in the event of a transport timeout
- Closed