activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmurar01 <>
Subject prefetch buffer along with acknowledgement mode
Date Thu, 29 Jul 2010 03:28:56 GMT

  We are using worker threads to process messages. So, onMessage() calls
simply return by delegating the processing to the worker thread. Once the
worker thread processes the message, worker thread calls
message.acknowledge(). So, if I set a prefetch buffer of 10, and 9 messages
are getting processed now and 1 finished processing and sent an
acknowledge(), I would expect only 1 message to show up in my prefetch
buffer. But, the prefetch buffer gets filled with next message as soon as
onMessage() completes, not when message.acknowledge() happens.  Why is
that??? I tried setting ackMode in CLIENT_ACKNOWLEDGE,
INDIVIDUAL_ACKNOWLEDGE. I even tried session.commit(). Nothing seems to stop
filling up prefetch buffer.  Any Ideas??? We don't want to avoid using
receive() or adding multiple consumers by setting prefetchLimit of 1.
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message