You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by rolin <ro...@wellington.com> on 2012/11/22 20:53:41 UTC

Can failover transport retry current connection first?

Hi, 

I am running activemq 5.4.2 with JDK1.6.025 in Linux.   There are two
brokers configured via network of brokers.  Java client connects to brokers
using the following failover url: 
failover:(tcp://broker1:61616,tcp://broker2:61616)?randomize=false&initialReconnectDelay=15000&maxReconnectAttempts=10 

Java client sometimes falsely detects connection lost to broker1 and
successfully reconnects to broker2.  Is there a way to configure failover
transport to retry broker1 first before trying broker2? 

I understand that "Priority Backup" is introduced as part of 5.6.0 and that
might serve the purpose.  But I am using 5.4.2 and do not plan to upgrade in
near future. 

The cause of false detection of connection lost is under investigation.  It
could be caused by long GC (>30 seconds).  But it is a separate issue. 

Regards,
-Ron



--
View this message in context: http://activemq.2283324.n4.nabble.com/Can-failover-transport-retry-current-connection-first-tp4659681.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Can failover transport retry current connection first?

Posted by Gary Tully <ga...@gmail.com>.
it is not a great solution, but you could repeat the
tcp://broker1:61616 urla few times.
The logic discards the current url on failure and moves on to the next in
the list.

There is a backup option, which keeps a hot backup, but if this is created
at the same time it may suffer from the same problem.

The backup needs a unique url, so if you do repeat the broker1 url, add a
query parameter (one that is inconsequential b/c all query parameters must
be valid)  that uniquely identifies each. like tcp://broker1:61616?jmxPort
=1000,tcp://broker1:61616?jmxPort=1001

the jmxPort transport option is only used when trace && dynamicManagement=true
which is unusual.

On 22 November 2012 19:53, rolin <ro...@wellington.com> wrote:

> tcp://broker1:61616




-- 
http://redhat.com
http://blog.garytully.com