All, We're using AMQ as follows: A producer is connected to it's own (almost embedded) broker to deliver messages reliably (using kaha persistence) A consumer is connected to the broker and sets the ack mode to CLIENT_ACKNOLEDGMENT. The consumer is itself multi threaded and the thread that processes the messages is not the same thread the consumes them. The processing thread has an internal work queue that is used for the consumed messages as well as periodic tasks. The processing thread acknowledges messages as it finishes processing them (in batches).
While the consumer is going through fast enough to consume and process the messages, the ack mode makes no difference. However, if there's a backlog for whatever reason, and the consumer is disconnected from the queue for whatever reason (network disruption or other reasons), then upon reconnecting to the broker, all messages that were delivered to the consuming thread above, but not yet processed, are lost to the consumer, as the ack operations while the consumer is running acknowledges ALL messages delivered to that point to the consumer. So, my question is: what's the best practice for achieving this goal? Is there a way to control the acknowledgement so it pertains to the messages rather than the session? Is the only way to achieve this to block the consuming thread and not let any more messages be consumed whilst the processing thread is busy processing the current batch of messages? Any help would be appreciated. Cheers, Bonny -- View this message in context: http://www.nabble.com/How-to%3A-Slow-consumers-and-CLIENT_ACKNOWLEDGE--tp18356204p18356204.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.