activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pesochinskiy, Vadim \(MSCIBARRA\)" <>
Subject RE: Pulling consumer design
Date Thu, 10 Aug 2006 19:02:41 GMT
Thanks a lot, this is great!!!

In the standard amq distribution there is this all-including jar called

I cannot make maven build this. I use the following command, which
creates all target jars but not the one I need.

mvn -Dmaven.test.skip=true package

-----Original Message-----
From: James Strachan [] 
Sent: Thursday, August 10, 2006 11:49 AM
Subject: Re: Pulling consumer design

On 8/10/06, Pesochinskiy, Vadim (MSCIBARRA)
<> wrote:
> James,
> One way to implement this, which I think will fit with current design 
> is to introduce a MessagePullCommand, which informs the broker that 
> consumer is ready to accept next message. When broker get this request

> it dispatches one message to this consumer. What do you think about 
> this?

Good idea. Actually if you check SVN trunk I committed something like
this about an hour ago :)

I'm just committing a test case that shows it working as I type
(ZeroPrefetchConsumerTest) :)

So basically prefetch of zero can be supported for synchronous consumers
(where receive(long) or receive() is called). We throw an exception if
you try and use it for async subscription

The one issue with the current implementation is that the
receive(timeout) must wait long enough for a message to arrive from the
broker; otherwise the method may return but a message is dispatched just
shortly afterwards. So provided you give a reasonably large
receive(timeout) then it should do what you need.



NOTICE: If received in error, please destroy and notify sender. Sender does not intend to
waive confidentiality or privilege. Use of this email is prohibited when received in error.

View raw message