Yep, that's the normal behavior.
The A servers are probably failing to connect before the B brokers are
started. With the parameters you set, and starting A servers before B
brokers, it's bound to fail...
Try increasing maxReconnectAttempts and maxReconnectDelay parameters,
so there's enough time to B brokers to start before A servers give up
trying.
BTW, which is the behaviour you're looking for? Infinite retries?
Inmediate fail in case both B brokers are down?
Regards
Eduardo Corral
delphz escribió:
OK, it was my mistake, i set a boolean to late...
Now, I have the following configuration :
failover://(tcp://B1:61616,tcp://B2:62626)?maxReconnectAttempts=1&maxReconnectDelay=100
But when I restart my activemq server, my A servers cannot reconnect to it.
When I send a message, I have : javax.jms.JMSException: Connection refused.
Have you got an idea ?
delphz wrote:
I set the maxReconnectAttempts to 1 and it is trying to reconnect
endlessly. And it can't connect to the B servers, even if they are up.
Eduardo Corral wrote:
Hi Delphine
Have you checked the log files? Maybe the clients (A1, A2,...) do follow
the timeout parameter, but they are trying to reconnect endlessly...
http://activemq.apache.org/failover-transport-reference.html
With failover, you may also configure how long between retries and how
many of them.
Best regards,
Eduardo Corral
delphz escribió:
Hello,
I have some servers A1, A2, AN, ... that send messages on a queue on
servers
B1 ans B2. I configured my A servers to connect with the following URI :
failover:(tcp://B1:61616,tcpB2:62626). But when activemq is stopped on
both
B1 and B2, my servers A wait a long time before deciding that B1 and B2
are
down. So I test to add a timeout.
If I configure my A servers with :
tcp://B1:61616?connectionTimeout=1000, I
have no problem. But if I configured with the following :
failover:(tcp://B1:61616?connectionTimeout=1000,tcp://B2:62626?connectionTimeout=1000),
it doesn't work. I tried lot of things :
- set connectionTimeout after the ) :
failover:(B1,B2)?connectionTimeout=1000
- set closeTimeout on my ConnectionFactory
- set wireFormat.maxInactivityDuration
- ...
I can't get it work.
Could you tell me how to configure it ?
Thanks !!
Delphine