On 10/20/2015 06:51 PM, rth wrote:
> If I set a prefetch limit will it have any effect if my consumer is using
> auto-acknowledge? I'm guessing the answer is no. It seems to me the message
> would be sent to the consumer and auto-acknowledged, so the broker would
> keep sending messages. Is that correct?
>
>
>
>
>
> --
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/prefetch-and-auto-acknowledge-tp4703212.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
The messages are acknowledged by the consumer once you consume them, not
before.  So either you consume them via a receive call which means the
message is ack'd prior to the return of the receive method, or you set
an async MessageListener and each message is ack'd before it is passed
onto the onMessage call.  If you don't do these things then the message
sits in the prefetch buffer until the consumer is closed, not being
ack'd and not being dispatched to some other consumer.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.b...@redhat.com | www.redhat.com 
twitter: @tabish121
blog: http://timbish.blogspot.com/

Reply via email to