activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder" <bruce.sny...@gmail.com>
Subject Re: Question about RoundRobbinDispatchPolicy
Date Thu, 27 Nov 2008 03:58:38 GMT
On Wed, Nov 26, 2008 at 6:58 PM, WhiteSock <whitesock1979@hotmail.com> wrote:
>
> 1 Start consumer A which subscribes Queue1, it receives the message without
> delay.
> 2 Start consumer B which subscribes Queue1, it delays 5 seconds after
> receiving every messages(sleep 5 seconds in onMessage method).
> 3 Start producer C and send a message(message0, message1, message2,
> message3...) to Queue1 every 1 second.
> 4 consumer A got message0, message2, message4, message6, message8,
> message10...
>  consumer B got message1, message3, message5...
>  That is to say consumer A got messages with even id, consumer B got
> messages with odd id.
>  Since consumer B is relatively slow, there are some messages with odd id
> accumulated in Queue1.
>
> 5 consumer A is relatively fast, why not let consumer A consume more
> messages?
>  Is it related to RoundRobbinDispatchPolicy?

This situation is more related to the lack of prefetch buffer settings
on the slow consumer:

http://activemq.apache.org/what-is-the-prefetch-limit-for.html

Only after understanding and configuring prefetch buffers for slow
consumers should you be concerned with the dispatch policies:

http://activemq.apache.org/dispatch-policies.html

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/

Mime
View raw message