You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Peter Niederwieser <pn...@gmail.com> on 2008/10/22 22:50:14 UTC

Question related to prefetch size

Hi,

how is it possible for a consumer with PrefetchSize=1 to have
MessageCountAwaitingAcknowledge=2? My assumption was that the consumer would
only get a second message after acknowledging the first one, but JMX tells
me the opposite. My setup: ActiveMQ 5.1, Spring 2.5.5,
DefaultMessageListenerContainer listening on a queue and using acknowledge
mode "client".

Cheers,
Peter
-- 
View this message in context: http://www.nabble.com/Question-related-to-prefetch-size-tp20119344p20119344.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Question related to prefetch size

Posted by Peter Niederwieser <pn...@gmail.com>.

rajdavies wrote:
> 
> prefetchSize=0 is what you're probably after
> 

Thanks, that seems to do the job. However the documentation needs to be
fixed. From http://activemq.apache.org/what-is-the-prefetch-limit-for.html:

If you have very few messages and each message takes a very long time to
process you might want to set the prefetch value to 1 so that a consumer is
given one message at a time.

Cheers,
Peter

-- 
View this message in context: http://www.nabble.com/Question-related-to-prefetch-size-tp20119344p20127937.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Question related to prefetch size

Posted by Rob Davies <ra...@gmail.com>.
prefetchSize=0 is what you're probably after
On 22 Oct 2008, at 21:50, Peter Niederwieser wrote:

>
> Hi,
>
> how is it possible for a consumer with PrefetchSize=1 to have
> MessageCountAwaitingAcknowledge=2? My assumption was that the  
> consumer would
> only get a second message after acknowledging the first one, but JMX  
> tells
> me the opposite. My setup: ActiveMQ 5.1, Spring 2.5.5,
> DefaultMessageListenerContainer listening on a queue and using  
> acknowledge
> mode "client".
>
> Cheers,
> Peter
> -- 
> View this message in context: http://www.nabble.com/Question-related-to-prefetch-size-tp20119344p20119344.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>