This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Reconnect to activemq" Watch "Reconnect to activemq" New topic
Author

Reconnect to activemq

Rajeev Mutalik
Greenhorn

Joined: Jul 09, 2013
Posts: 4
Hi,
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:
<transportConnectors>
<transportConnector name="local.broker" uri="tcp://localhost:61616"/>
</transportConnectors>

Have inserted space after "failover:" to avoid emoticons.
Thanks in advance.
Rajeev
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Reconnect to activemq