activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <>
Subject Re: Difference between prefetch=0 and prefetch=1?
Date Tue, 05 Jul 2011 15:01:57 GMT
Hi Martin,

the only thing is that prefetch=0 will not work with async listeners
(nothing will be pushed to the consumer), but the consumer needs to call
receive() method explicitly (pull the message).

Dejan Bosanac -
The experts in open source integration and messaging -
ActiveMQ in Action -
Blog -

On Tue, Jul 5, 2011 at 4:49 PM, Martin C. <> wrote:

> Hi,
> When reviewing ActiveMQ code, I see a lot of special treatment for the
> prefetch=0 case. What exactly is the conceptual difference between 1
> and 0 prefetch?
> We are currently using prefetch=0 via failover, but are in the process
> of migrating away from failover to multiple connections with Spring
> DefaultMessageListenerContainer, which won't stop on container
> shutdown, as the message is stopped before the MessageDispatch from
> the broker is returned (i.e. there is the special case that the
> MessageConsumer waits indefinitely for a MessagePull from the server
> on prefetch=0).
> So what exactly do I have to expect as difference in regards to
> message ordering, load balancing, message groups when using prefetch=1
> instead of prefetch=0?
> Thanks for any explanation!
> Best regards,
> Martin

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message