You'll probably want to use the priorityBackup option on the failover transport, to ensure that any long-running connections return to server #1 when it comes back up. http://activemq.apache.org/failover-transport-reference.html
If you're going to run two standalone brokers for this scenario, they should be networked, as Mats suggested. That way it won't matter whether they are all currently on the same broker or not. (It's impossible to guarantee that there won't be at least a brief period where some clients are on one broker and some on the other, so you'll want to handle that case no matter what.) Make sure you read the Stuck Messages section of the page Mats linked to, for an edge case you'll want to handle. But you might want to consider running your brokers as a master/slave pair, which will ensure that everyone is using the same broker because only one will be active at a time. Tim On Dec 5, 2016 5:57 AM, "mf" <[email protected]> wrote: > Hi, > maybe just copy-paste error or you have a typo with 'andomize', it should > be > 'randomize' (?) :) > > Maybe off topic, but I think a network of brokers setup is sweet, running > two brokers with independant storage, in case one broker goes down and > comes > back, the brokers would be able to pass messages in between them > independently on to which broker the consumers connects. > (http://activemq.apache.org/networks-of-brokers.html) > > regards > Mats > > > > -- > View this message in context: http://activemq.2283324.n4. > nabble.com/ActiveMQ-failover-transport-producers-consumers- > work-on-different-hosts-tp4719747p4719751.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >
