activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: NMS PrefetchSize=0
Date Tue, 28 Jul 2009 15:40:32 GMT
On Tue, 2009-07-28 at 08:26 -0700, magellings wrote:
> Hello.
> 
> When setting PrefetchSize on the Session to 0 I do not obtain any messages
> when using the Listener event on the MessageConsumer.
> 
> If I call Receive on the MessageConsumer to initiate a pull request I can
> obtain messages.  Can this work with the Listener event too and maybe I'm
> missing something?

No, setting a prefetch size of zero implies you need to use the
MessageConsumer's receive methods to initiate a pull from the broker
each time you want to obtain another message.  The asynchronous consumer
model only works for prefetch sizes of 1 or greater.

Regards
Tim.




Mime
View raw message