qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Godfrey <rob.j.godf...@gmail.com>
Subject Re: Synchronous consumer can only dequeue 1 message in AMQP 0-91
Date Thu, 04 Sep 2014 17:32:04 GMT
On 4 September 2014 19:13, xiaodan.wang <xiaodan.wang@salesforce.com> wrote:

> Looks like I replied before seeing your followup :)
> > To expand a little further... The behaviour I'm thinking about for 0-9-1
> > would be that on a synchronous session, every time you call receive() the
> > client opens up the credit window enough for you to receive a message if
> > there isn't currently credit enough to get the message.  At the point a
> > commit occurs (on a transacted session), or an acknowledge (on a client
> > ack
> > session), the window is reduced again such that no new messages will be
> > prefetched until a receive is called...
> And also if the window could be reduced when "receive" times out, mainly to
> prevent a message that arrives after we've started working on the
> previously
> dequeued set of message.
OK - good point - I'll add that to the requirements :-)

> > The other (potentially simpler for me, but hackier) possibility would be
> > to
> > provide some way of allowing you to manually flex the prefetch size on an
> > individual session... this would probably require casting into a qpid
> > specific class for you so you could directly manipulate the session
> > object.
> Would the manual re-sizing be done dynamically or only at session creation
> time? For us, over-sizing (setting prefetch of 10 when there are only 8
> messages at the moment) could lead to the starvation of late arrival
> messages mentioned above.
At the moment I'm thinking the 0-9 behaviour described above is the right
way to go, because, basically it is the sane behaviour anyone would want
from a synchronous session.  The only issue is where you have mutliple
consumers on a single session in which case you might ask to receive() on
one consumer, but the prefetched message arrives on a different
consumer...  In your case, in the synchronous session do you just have the
one onsumer on the session?

-- Rob

> Cheers! Dan
> --
> View this message in context:
> http://qpid.2158936.n2.nabble.com/Synchronous-consumer-can-only-dequeue-1-message-in-AMQP-0-91-tp7613017p7613072.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org

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