activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A. Gregory Rabil" <greg.ra...@ins.com>
Subject Failover configuration for JMS clients using JNDI
Date Wed, 04 Mar 2009 15:15:24 GMT

Hello,
I'm using ActiveMQ 5.2.0, and I'm trying to configure a simple test of the
"failover" transport.  I have two brokers A and B, and a JMS client on a
remote machine.  I want the client to connect to Broker A, unless it is
unavailable, in which case it should connect to Broker B.  Likewise, if the
client is connected to Broker A, and Broker A crashes, or the client
otherwise loses connection to Broker A, I want it to failover to Broker B. 
Here is my jndi.properties file for the JMS client:

java.naming.factory.initial =
org.apache.activemq.jndi.ActiveMQInitialContextFactory

# use the following property to configure the default connector
java.naming.provider.url = tcp://localhost:61616

# use the following property to specify the JNDI name the connection factory
# should appear as.
connectionFactoryNames = LocalActiveMqConnectionFactory,
ActiveMqConnectionFactory

connection.LocalActiveMqConnectionFactory.url = tcp://localhost:61616

connection.ActiveMqConnectionFactory.url =
failover:(ssl://broker-a:61617,ssl://broker-b:61617)?randomize=false


When my client used the ActiveMqConnectionFactory to connect to the remote
broker, it connects to Broker A if Broker A is available when the client
connects.  However, if Broker A is not available, it never attempts to
connect to Broker B.  Also, if connected to Broker A, and Broker A is
stopped, the client does not successfully "failover", instead I just get
this in the client's log:

2009-03-04 15:09:04,221 ()[ActiveMQ Transport: ssl:///broker-a:61617] WARN 
FailoverTransport - Transport failed to ssl://broker-a:61617 , attempting to
automatically reconnect due to: java.io.EOFException
2009-03-04 15:09:04,222 ()[ActiveMQ Transport: ssl:///broker-a:61617] WARN 
FailoverTransport - Transport failed to ssl://broker-a:61617 , attempting to
automatically reconnect due to: java.io.EOFException


Please let me know what I need to configure to get this behavior to work, as
this seems to be a fairly simple test of the "failover" transport, yet I
can't seem to get a successful test.

Thank you,
Greg Rabil

-- 
View this message in context: http://www.nabble.com/Failover-configuration-for-JMS-clients-using-JNDI-tp22332064p22332064.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message