Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes EJB and other Java EE Technologies and the fly likes Reconnect to activemq Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Reconnect to activemq" Watch "Reconnect to activemq" New topic

Reconnect to activemq

Rajeev Mutalik

Joined: Jul 09, 2013
Posts: 3
I have a consumer which connects to activemq. Problem is when the activemq is restarted my consumer does not reconnect to activemq. So I need to restart my application for that. Can you please help me on how to go abt auto reconnect to activemq.

Got this info from apache website, but not sure where to edit the configuration.
failover: (tcp://primary:61616,tcp://secondary:61616)?randomize=false
failover: (tcp://localhost:61616,tcp://remotehost:61616)?initialReconnectDelay=100

Is it that I need to edit the following section of my broker-config.xml:
<transportConnector name="" uri="tcp://localhost:61616"/>

Have inserted space after "failover:" to avoid emoticons.
Thanks in advance.
jQuery in Action, 2nd edition
subject: Reconnect to activemq
Similar Threads
Unable to connect to java.naming.provider.url value
Help with sample JMS program. Getting NoClassDefFoundError, ClassNotFoundException
ActiveMQ High Availability dynamic slave configurations
wrong broker address with multicast lookup