activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wjmcdonald <>
Subject Re: Load Balancing Producer Messages from the JMS Client side
Date Fri, 21 Sep 2012 23:26:12 GMT
Update: After a short experiment, it appears that if you ask for two
connections from ActiveMQConnectionFactory (it doesn't matter if its the
same or a different ActiveMQConnectionFactory  instance), which use(s)
failover://(tcp://host1:port,tcp://host2:port) where randomize defaults to
true, that it is possible that the connections can either both turn out to
be from host1 or host2 or one for each host.  

I suppose using a random algorithm to select which broker to connect to may
be load balancing (of connections, not messages) but its indiscriminate and

Using 'failover' for load balancing seems backwards.  Load balancing should
be a first class citizen, with failover   simply being a load balancing
problem where one of the broker's through-puts is 0.  When another broker
(the slave) comes up, the balancer doesn't care that it was a slave, it just
sees a new resource to utilize.  Let the slave handle the fail-back
setting/ability so that it can fail-back if the old master comes back up. 
The balancer will readjust to the masters sudden appearance and the slave's
disappearance as a natural part of its paradigm/processing.

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

View raw message