Details
-
Type:
Improvement
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.16.1
-
Component/s: camel-rabbitmq
-
Labels:None
-
Patch Info:Patch Available
-
Estimated Complexity:Unknown
Description
Currently if an exception is thrown during the processing of an InOut exchange on rabbitMQ, and both transferException=true and autoAck=false, the exception will be transferred back to the producer however the original message will remain unacknowledged. If the server is restarted, the application will attempt to reprocess the message.
I would like to propose a patch to include a basicAck in the rabbitMQ consumer in this scenario. I’ve chosen to use a basicAck rather than a rejection given that the exception would be handled by the producer in this scenario and there should be no need to deadletter/requeue the messages on rabbitmq.
More details on our setup here:
http://camel.465427.n5.nabble.com/Messages-remain-unacknowledged-when-exception-thrown-during-RabbitMQ-InOut-td5773786.html