You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by stevec <ba...@hotmail.com> on 2008/08/26 07:28:16 UTC

how to set priority of brokers in failover URI

On the client, how do i set up the connection priority for the broker URI?

failover:(tcp://x.x.x.x:xx,tcp://y.y.y.y:yy)  

currently, the client will randomly pick an IP and try to connect to it. 
This works fine, but i do not want random.

I would like to have a list of 4 or more brokers and have the client connect
to them in order.  if the first fails, try the second, then the third, etc. 
But i would like to the clients to always try to connect to the priority.

also, if the client successfully connects to the third, and the third fails
sometime thereafter, it might be nice if it then tried to connect to the
first again, then the second, third, fourth, etc.   But i dont have to be so
picky, i would just be happy if i could control the initial connection for
bandwidth purposes.

thanks for any assistance so that i can set this up.

-- 
View this message in context: http://www.nabble.com/how-to-set-priority-of-brokers-in-failover-URI-tp19156001p19156001.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: how to set priority of brokers in failover URI

Posted by Gary Tully <ga...@gmail.com>.
You can turn off the default random behavior and have an ordered list
with the following:

  failover:(tcp://x.x.x.x:xx,tcp://y.y.y.y:yy)?randomize=false

see: http://activemq.apache.org/failover-transport-reference.html for
more options.

2008/8/26 stevec <ba...@hotmail.com>:
>
> On the client, how do i set up the connection priority for the broker URI?
>
> failover:(tcp://x.x.x.x:xx,tcp://y.y.y.y:yy)
>
> currently, the client will randomly pick an IP and try to connect to it.
> This works fine, but i do not want random.
>
> I would like to have a list of 4 or more brokers and have the client connect
> to them in order.  if the first fails, try the second, then the third, etc.
> But i would like to the clients to always try to connect to the priority.
>
> also, if the client successfully connects to the third, and the third fails
> sometime thereafter, it might be nice if it then tried to connect to the
> first again, then the second, third, fourth, etc.   But i dont have to be so
> picky, i would just be happy if i could control the initial connection for
> bandwidth purposes.
>
> thanks for any assistance so that i can set this up.
>
> --
> View this message in context: http://www.nabble.com/how-to-set-priority-of-brokers-in-failover-URI-tp19156001p19156001.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>