[rabbitmq-discuss] How to handle AcknowledgeMode.MANUAL acknowledgements within handleMessage() method at consumer end?

Michael Klishin mklishin at gopivotal.com
Wed Jan 8 11:25:36 GMT 2014


On 8 Jan 2014, at 14:41, Rajasekhar P <sekhar434145 at gmail.com> wrote:

> I want to handle acknowledgements manually, because, if any error occurs while processing message it should not be deleted from the queue. For this I have used AcknowledgeMode.MANUAL , but am not getting how to set the acknowledgement after processing the message in handleMessage method. Can anyone tell me how to do that?

Section 3.11 in [1] suggests you are supposed to use Channel#basicAck from RabbitMQ Java client
directly.

1. http://docs.spring.io/spring-amqp/docs/1.2.1.BUILD-SNAPSHOT/reference/html/amqp.html#d4e329

MK

Software Engineer, Pivotal/RabbitMQ




More information about the rabbitmq-discuss mailing list