2
votes

Just walked through these docs:

  • http://activemq.apache.org/failover-transport-reference.html <--- As I understood, failover allows Producer and Consumer to produce/consume a secondary queue only if first becomes unavailable and return to the primary one as soon as it's back again. This behaviour is definitely NOT load balancing.
  • http://activemq.apache.org/networks-of-brokers.html <--- They provide some approaches how to replicate messages across multiple Broker instances there. If one goes down, the clients can automatically failover to a slave which will have all the messages already, so each message is highly available. But this is not what I'm expecting too.

So, Is it possible to configure Consumer and Producer applications to connect and balance the load between multiple broker instances (in Round Robin or similar way)?

1

1 Answers

1
votes

this is what the network of brokers in store and forward mode is designed to do...queues are distributed for load balancing (note: this is not HA however...if a broker goes down, its messages are stuck in the message store until the broker is restarted, need master/slave for HA)

if we had broker A, B, C and a publisher on a queue on A. If we have consumers on the queue on A and B then messages for the queue will be spread across both brokers A and B; some messages going to B, some being consumed on A, none going to C. If a consumer on the queue starts on C, then messages will flow there too. If the consumer stops then no more messages will be dispatched to C.