GeeCON Prague 2014*
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


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
 
GeeCON Prague 2014
 
subject: Reconnect to activemq