activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pollotek <>
Subject Questions about Networks of brokers and fail-over scenarios
Date Wed, 14 Mar 2012 07:07:22 GMT
Hi all,

I am trying to set up a fault tolerant horizontaly scalable architecture
with ActiveMQ servers. I see that I can setup a horizontally extensible
ActiveMQ Network of Brokers by having the consumers connect to a random
failover broker with something like this (say start with for 2 brokers):


and on the brokers configure a bridge network connector as dynamicOnly and
low network prefetchSize on bridge connectors pointing to each other to move
the messages from one to another.

Given a producer connected to /broker1 /queuing messages on a persistent
queue and consumers attached to both brokers listening for messages for the
same queue.

If /broker1 /goes down the consumers pointing at /broker1 /will re-balance
to read from broker2 and the producer will automatically point to /broker2/.

- What happens to the persistent queue messages on /broker1 /that were not
consumed yet? I guess the messages will sit on /broker1 /until it gets
restarted and eventually get consumed, correct? I guess in this scenario we
lose total ordering, correct?
- If I only had one producer queuing messages on /broker1 /and only a
consumer on /broker2/. When will messages be forwarded to /broker2/? What if
a new consumer connects to /broker1 /and tries to consume from the same
queue? Will /broker2 /stop receiving messages because somebody is consuming
them directly on /broker1/?

What if there was no failure and instead a new producer started queuing
messages on the same queue on /broker2/. Given that there are consumers for
this queue attached to both brokers would any of the messages be forwarded
across the two brokers ? Would this happen only if one of the broker runs
out of messages for the consumers and the other one still has messages?

I hope somebody can help me out to answer these very specific questions
about these Network of Brokers fail-over scenarios

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message