activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: Unpredictable behavior of the ActieMQ broker if the prefetch size is changed
Date Wed, 09 Feb 2011 12:14:36 GMT
unacked prefetched messages are only available to other consumers when
a consumer dies. If the connection is not closed, from the broker
perspective, the consumer is just slow.
You need to decrease the inactivity timeout (default 30 seconds) on
the interrupted consumers connection such that the broker can kill off
the connection in a timely manner. Only then will it be able to
dispatch the unacked messages to another consumer.
If you reduce the prefetch to 0, both consumers will pull a single
message at a time, so inactive consumers will not get messages.

On 9 February 2011 11:37, ActiveMQ2011User <nils.thieme@unister.de> wrote:
>
> We encountered a strange behavior if we change the prefetch size for the
> consumers. We have two threads that receives message. The first one fetch
> some messages and is then interrupted without closing the connection to the
> broker. If the second thread is created it can't receive any messages. In
> this scenario we don't changed the default prefetch limit.
>
> So if change the prefetch to 50 for example, the second receives messages.
> This works.
>
> If we set the prefetch limit to 600 or above, the second thread receives
> some message but slows down till no more message is received.
>
> This behavior isn't understood by us because the prefetch size is the number
> of messages the broker will deliver to the consumer without acknowledge
> these.
>
> In the queue that we are using are enough messages to consume by the
> clients.
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Unpredictable-behavior-of-the-ActieMQ-broker-if-the-prefetch-size-is-changed-tp3297083p3297083.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://blog.garytully.com
http://fusesource.com

Mime
View raw message