activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: Apache NMS 1.2.0 RC1 now ready for download.
Date Fri, 11 Dec 2009 19:00:44 GMT
On Fri, 2009-12-11 at 10:09 -0800, magellings wrote:
> So when assigning a delegate (e.g. OnMessage) to the Listener event on the
> message consumer, the framework can't pull for another message after the
> scope of the delegate ends?  Is this how the java implementation behaves? 
> This isn't a big deal, we already were defaulting to doing pulls manually
> with MessageConsumer.Receive if prefetch is set to zero.  I guess just in my
> head I expected it to do it automatically even with the listener event
> assigned.

This is exactly how the Java and C++ clients behave as well, and its by
design.  If you want an asynchronous consumer then you need to set a
prefetch of at least one, then when a message is available the broker
will dispatch it, otherwise there's no traffic needed between client and
broker other than the keep alive commands.  The prefetch zero
functionality was introduced into AMQ for the purpose of having a
polling only consumer model.

We want to try to keep the openwire clients as close in functionality as
possible so that using them is as seamless as possible.  

Regards
Tim.

> 
> http://activemq.apache.org/what-is-the-prefetch-limit-for.html 
> 
> "Specifying a prefetch limit of zero means the consumer will poll for more
> messages, one at a time, instead of the message being pushed to the
> consumer."
> 
> -Mark
> 
> 
> Timothy Bish wrote:
> > 
> > On Fri, 2009-12-11 at 08:38 -0800, magellings wrote:
> >> Hey Tim.  Could you explain this a bit more?  How come this isn't
> >> possible. 
> >> Seems like it should be.  Thanks :-)
> >> 
> >> Quad.NMS.Integration.Test.PrefetchZeroPullTest.Should_be_able_to_set_prefetch_to_zero_and_nms_activemq_enables_pull_mode
> >> : Apache.NMS.NMSException : Cannot set Asynchronous Listener on a
> >> Consumer
> >> with a zero Prefetch size
> > 
> > With prefetch set to zero there is never going to be any messages
> > delivered from the broker.  The perfetch zero setting basically turns
> > your client into a pull consumer, each time you call
> > IMessageConsumer.Receive a MessagePull command it sent to the Broker, if
> > a message is available then one is delivered to the client.  With an
> > asynchronous consumer there is nothing to initiate the MessagePull from
> > the broker, so you'd never receive a message.
> > 
> > Regards
> > Tim.
> > 
> >> 
> >> 
> >> Timothy Bish wrote:
> >> > 
> >> >                       ***** ANNOUNCEMENT *****
> >> > 
> >> > The Apache NMS 1.2.0 Release Candidate 1 is now available at the
> >> > following location:
> >> > 
> >> > http://people.apache.org/~tabish/nms-1.2.0-RC1
> >> > 
> >> > The following projects are included:
> >> > 
> >> > Apache.NMS
> >> > Apache.NMS.ActiveMQ
> >> > Apache.NMS.EMS
> >> > Apache.NMS.MSMQ
> >> > Apache.NMS.WCF
> >> > 
> >> > There are release binaries and debug binaries (with PDBs) provided. 
> >> The
> >> > binary ZIP files include pre-built assemblies for all of the platforms
> >> > that are supported by each project (e.g., .NET 2.0, Mono, .NET 3.5,
> >> > etc).  Not all projects support all platforms.  Please note that in
> >> > order to use the Apache.NMS.EMS project files, you will need to provide
> >> > your own copy of the TIBCO.EMS.dll, as this is a licensed 3rd Party
> >> > application.
> >> > 
> >> > Please report any issues or problems you have with these files.
> >> > 
> >> > Regards
> >> > Tim Bish
> >> > 
> >> > 
> >> > 
> >> 
> > 
> > 
> > 
> 
-- 
Tim Bish
http://fusesource.com
http://timbish.blogspot.com/




Mime
View raw message