|
|||||
|
|||||
How to auto reconnnect if the JMS broker is down
If a JMS broker goes down your JMS connection fails and so does your Lingo remoting layer. So its useful to be able to avoid this issue, so that your application keeps running irrespective of whether the JMS broker you are connected to is taken down (or a network error causes it to be temporarily inaccessible). You have two options.
in particular on 4.x you can configure the failover reconnection policy so you can configure the ActiveMQ client to reconnect forever by setting the brokerURL property on the ActiveMQConnectionFactory to something like failover:(tcp://host:port)?maxReconnectAttempts=0
Where host and port are the actual host and port to use. Note inside the () you can specify a list of URLs to connect to; one will be randomly chosen |
|||||
|
Copyright 2003-2006 - The Codehaus. All rights reserved unless otherwise noted.
Powered by Atlassian Confluence
|
|||||