have a look at https://issues.apache.org/jira/browse/AMQ-2376, the expiryTimeout attribute may be what you need as this can be used to limit the lifetime of a connection in the pool.
On 12 April 2011 20:35, dcheckoway <dchecko...@gmail.com> wrote: > I've got producers set up to randomize to my broker nodes, such as: > > failover:(tcp://mq01:61616,tcp://mq02:61616)?randomize=true > > Let's say the connection pool is set to max=10. Normally you'd see > "roughly" (randomly) 50/50 distribution to the two brokers, say 5 connected > to mq01, and 5 connected to mq02. That works great, no complaints. > > Now I restart activemq on mq01. The producers happily continue along, > failing over to mq02. So now all 10 connections in the pool are connected > to mq02. That's cool, expected. But once mq01 comes back online, it sits > idle unless/until I restart my producers. > > Thus my question. Is there a way to force my producers to "re-randomize" > their connections? I'd love to be able to push a button and -- seamlessly, > of course -- have the connection pool reconnect just as they would at > first-connect time. > > Possible? Wish list enhancement? > > ----- > Dan Checkoway > dcheckoway gmail com > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Force-a-failover-re-randomize-tp3445497p3445497.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > -- http://blog.garytully.com http://fusesource.com