A client which uses HornetQConnectionFactory doesn't failover automatically
Issue
We have an external client to HornetQ. The client is deployed on Jetty server and uses HornetQConnectionFactory injected into Spring JMSTemplate.
When the live node goes down the client doesn't transparently failover to a new live node even though we configured group discovery. Based on debug messages client is aware of both nodes:
DEBUG: [org.springframework.jms.connection.CachingConnectionFactory qtp403338578-124] reqId=-51ffdce0:1468cbabcb6:-8000; Closing cached Session: HornetQRASession->DelegatingSession [session=ClientSessionImpl [name=535afc29-f1ab-11e3-81ad-0200ac134248, username=null, closed=false, factory = ClientSessionFactoryImpl [serverLocator=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5445&host=172-19-66-59], discoveryGroupConfiguration=DiscoveryGroupConfiguration [discoveryInitialWaitTimeout=15000, groupAddress=239.236.10.73, groupPort=7006, localBindAddress=null, name=dg-group1, refreshTimeout=5000]], connectorConfig=org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5445&host=172-19-66-70, backupConfig=null], metaData=(jms-session=,)]@577435c5]
After live node goes down we see the following message in our logs:
org.hornetq.core.logging.impl.JULLogDelegate warn
WARNING: Tried 10 times to connect. Now giving up on reconnecting it
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
