how to set priority of brokers in failover URI

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to set priority of brokers in failover URI

stevec
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.
Reply | Threaded
Open this post in threaded view
|

Re: how to set priority of brokers in failover URI

gtully
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 <[hidden email]>:

>
> 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.
>
>