[rabbitmq-discuss] Java API nextDelivery

Ben Hood 0x6e6562 at gmail.com
Wed Jan 28 23:24:56 GMT 2009


Sethrain,

On Wed, Jan 28, 2009 at 9:53 PM, sethtrain <seth.buntin at gmail.com> wrote:
>
> Am I missing something?  If I setup a QueueingConsumer and call
> nextDelivery() without acknowledging that message when I run nextDelivery()
> again shouldn't I get the same message?

Not really. The QueueingConsumer is just some higher level porcelain
around the AMQP execution model that offers blocking semantics to the
caller.

Under the covers it is buffering the messages delivered to it, which
could be piling up from the network, i.e. a situation where the broker
has pushed more messages over the network and up the client stack than
the consuming application has processed.

This touches on the semantics of deliver acknowledgments and egress
flow control.

To summarize these topics, unless the client explicitly specifies a
prefetch window, the broker will push messages to it until TCP back
pressure kicks in.

Furthermore, it makes a difference whether you specify auto-acks or not :-)

HTH,

Ben




More information about the rabbitmq-discuss mailing list