You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Ned Wolpert <ne...@gmail.com> on 2007/10/02 20:01:29 UTC

Load Balancing Question

Folks-

  I'm trying to see how to best configure an ActiveMQ instance, but I
seem to be getting stuck and can use the help. If there is a link that
has the answer, or if you know the solution, please let me know.
Here's the situation that is causing me grief

1) Start one queue client (ack=client)
2) Send 30 messages to the queue (client takes 10 seconds to process
each message)
3) While the queue client is processing the first message, start 2 new
client processors

The result is only the first queue client is processing any of those
first 30 messages. Only will new messages get 'round-robin'
assignment. So if after starting the those next 2 clients I send
another 30 messages, the first one will process a total of 40
messages, and the second two will process 10 messages each.

Is there a way in the configuration of the server, client, or anything
else, to better load balance the clients?  I tested this behavior with
4.1.1 and 5.0 snapshot with the same outcome.

Thanks!

-- 
Virtually, Ned Wolpert
http://www.codeheadsystems.com/blog/

"Settle thy studies, Faustus, and begin..."   --Marlowe

Re: Load Balancing Question

Posted by Ned Wolpert <ne...@gmail.com>.
Thanks, that was what I needed. (I also got a response from the
activemessaging group too for this)

On 10/2/07, Mario Siegenthaler <ms...@inventsoft.ch> wrote:
> I think you're issue is the prefetching of messages that is done by
> ActiveMQ. Set the prefetchSize to 1 and it should work as you expect
> it. See http://activemq.apache.org/what-is-the-prefetch-limit-for.html
>
> Mario
>
> On 10/2/07, Ned Wolpert <ne...@gmail.com> wrote:
> > Folks-
> >
> >   I'm trying to see how to best configure an ActiveMQ instance, but I
> > seem to be getting stuck and can use the help. If there is a link that
> > has the answer, or if you know the solution, please let me know.
> > Here's the situation that is causing me grief
> >
> > 1) Start one queue client (ack=client)
> > 2) Send 30 messages to the queue (client takes 10 seconds to process
> > each message)
> > 3) While the queue client is processing the first message, start 2 new
> > client processors
> >
> > The result is only the first queue client is processing any of those
> > first 30 messages. Only will new messages get 'round-robin'
> > assignment. So if after starting the those next 2 clients I send
> > another 30 messages, the first one will process a total of 40
> > messages, and the second two will process 10 messages each.
> >
> > Is there a way in the configuration of the server, client, or anything
> > else, to better load balance the clients?  I tested this behavior with
> > 4.1.1 and 5.0 snapshot with the same outcome.
> >
> > Thanks!
> >
> > --
> > Virtually, Ned Wolpert
> > http://www.codeheadsystems.com/blog/
> >
> > "Settle thy studies, Faustus, and begin..."   --Marlowe
> >
>


-- 
Virtually, Ned Wolpert
http://www.codeheadsystems.com/blog/

"Settle thy studies, Faustus, and begin..."   --Marlowe

Re: Load Balancing Question

Posted by Mario Siegenthaler <ms...@inventsoft.ch>.
I think you're issue is the prefetching of messages that is done by
ActiveMQ. Set the prefetchSize to 1 and it should work as you expect
it. See http://activemq.apache.org/what-is-the-prefetch-limit-for.html

Mario

On 10/2/07, Ned Wolpert <ne...@gmail.com> wrote:
> Folks-
>
>   I'm trying to see how to best configure an ActiveMQ instance, but I
> seem to be getting stuck and can use the help. If there is a link that
> has the answer, or if you know the solution, please let me know.
> Here's the situation that is causing me grief
>
> 1) Start one queue client (ack=client)
> 2) Send 30 messages to the queue (client takes 10 seconds to process
> each message)
> 3) While the queue client is processing the first message, start 2 new
> client processors
>
> The result is only the first queue client is processing any of those
> first 30 messages. Only will new messages get 'round-robin'
> assignment. So if after starting the those next 2 clients I send
> another 30 messages, the first one will process a total of 40
> messages, and the second two will process 10 messages each.
>
> Is there a way in the configuration of the server, client, or anything
> else, to better load balance the clients?  I tested this behavior with
> 4.1.1 and 5.0 snapshot with the same outcome.
>
> Thanks!
>
> --
> Virtually, Ned Wolpert
> http://www.codeheadsystems.com/blog/
>
> "Settle thy studies, Faustus, and begin..."   --Marlowe
>