You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by SarcasmMonster <pa...@gmail.com> on 2008/10/27 16:06:52 UTC

Loadbalancing MessageProducer

Is it possible to have a MessageProducer that automagically rotates between
destinations? This way it would be easy to load balance. And when the broker
is down, it won't rotate to that broker?

I thought the failover protocol fits the bill but it doesn't rotate until
the connection is down (even though the page says "The failover transport
uses random by default which lets you to load balance clients over a number
of brokers.")

Thanks,
SarcasmMonster
-- 
View this message in context: http://www.nabble.com/Loadbalancing-MessageProducer-tp20189528p20189528.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Loadbalancing MessageProducer

Posted by James Strachan <ja...@gmail.com>.
2008/10/29 SarcasmMonster <pa...@gmail.com>:
>
> I came across the fanout protocol while looking for the failover. But from my
> understanding, it will send every message to every broker, rather than
> rotating between them. So when I send a message, it will go to every broker,
> rather than just a random one. Is this right?

Yes. Hence the Jedi transport JIRA issue I mentioned in my previous
mails - to enhance fanout to deal with load balancing

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Re: Loadbalancing MessageProducer

Posted by SarcasmMonster <pa...@gmail.com>.
I came across the fanout protocol while looking for the failover. But from my
understanding, it will send every message to every broker, rather than
rotating between them. So when I send a message, it will go to every broker,
rather than just a random one. Is this right?
-- 
View this message in context: http://www.nabble.com/Loadbalancing-MessageProducer-tp20189528p20226848.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Loadbalancing MessageProducer

Posted by Rob Davies <ra...@gmail.com>.
You need to look at this: http://activemq.apache.org/fanout-transport-reference.html

cheers,

Rob

Rob Davies
http://fusesource.com
http://rajdavies.blogspot.com/


On 28 Oct 2008, at 20:03, SarcasmMonster wrote:

>
> The point was to load balance the JMS broker, that way we don't  
> hammer the
> same broker with thousands of messages a second, but rather  
> distribute the
> load between multiple brokers. Thanks for replying :)
>
>
> James.Strachan wrote:
>>
>> 2008/10/27 SarcasmMonster <pa...@gmail.com>:
>>> Is it possible to have a MessageProducer that automagically rotates
>>> between
>>> destinations? This way it would be easy to load balance.
>>
>> Just out of interest - why would you want to do that? A queue is a
>> reliable load balancer anyway - why would you want to load balance
>> across multiple destinations?
>>
>>
>>> And when the broker
>>> is down, it won't rotate to that broker?
>>>
>>> I thought the failover protocol fits the bill but it doesn't  
>>> rotate until
>>> the connection is down (even though the page says "The failover  
>>> transport
>>> uses random by default which lets you to load balance clients over a
>>> number
>>> of brokers.")
>>
>> Not currently, buts its a pending issue
>> http://issues.apache.org/activemq/browse/AMQ-816
>>
>> -- 
>> James
>> -------
>> http://macstrac.blogspot.com/
>>
>> Open Source Integration
>> http://fusesource.com/
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Loadbalancing-MessageProducer-tp20189528p20214934.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: Loadbalancing MessageProducer

Posted by James Strachan <ja...@gmail.com>.
2008/10/28 SarcasmMonster <pa...@gmail.com>:
>
> The point was to load balance the JMS broker, that way we don't hammer the
> same broker with thousands of messages a second,

BTW a single broker can usually handle that volume OK :)

> but rather distribute the
> load between multiple brokers.

Yeah - thats the main aim of the Jedi transport...

>> http://issues.apache.org/activemq/browse/AMQ-816

to let you load balance messages across brokers (or do clever
partitioning of messages in different brokers etc)
-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Re: Loadbalancing MessageProducer

Posted by SarcasmMonster <pa...@gmail.com>.
The point was to load balance the JMS broker, that way we don't hammer the
same broker with thousands of messages a second, but rather distribute the
load between multiple brokers. Thanks for replying :)


James.Strachan wrote:
> 
> 2008/10/27 SarcasmMonster <pa...@gmail.com>:
>> Is it possible to have a MessageProducer that automagically rotates
>> between
>> destinations? This way it would be easy to load balance.
> 
> Just out of interest - why would you want to do that? A queue is a
> reliable load balancer anyway - why would you want to load balance
> across multiple destinations?
> 
> 
>> And when the broker
>> is down, it won't rotate to that broker?
>>
>> I thought the failover protocol fits the bill but it doesn't rotate until
>> the connection is down (even though the page says "The failover transport
>> uses random by default which lets you to load balance clients over a
>> number
>> of brokers.")
> 
> Not currently, buts its a pending issue
> http://issues.apache.org/activemq/browse/AMQ-816
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://fusesource.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Loadbalancing-MessageProducer-tp20189528p20214934.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Loadbalancing MessageProducer

Posted by James Strachan <ja...@gmail.com>.
2008/10/27 SarcasmMonster <pa...@gmail.com>:
> Is it possible to have a MessageProducer that automagically rotates between
> destinations? This way it would be easy to load balance.

Just out of interest - why would you want to do that? A queue is a
reliable load balancer anyway - why would you want to load balance
across multiple destinations?


> And when the broker
> is down, it won't rotate to that broker?
>
> I thought the failover protocol fits the bill but it doesn't rotate until
> the connection is down (even though the page says "The failover transport
> uses random by default which lets you to load balance clients over a number
> of brokers.")

Not currently, buts its a pending issue
http://issues.apache.org/activemq/browse/AMQ-816

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/