[rabbitmq-discuss] Basic Nack not working
Guillaume Ouellet
gui.ouellet at gmail.com
Tue Jan 21 13:50:10 GMT 2014
Hi guys,
Here is a reference to my stackoverflow post. Basically I'm wondering if
I'm using nack as intented or not.
http://stackoverflow.com/questions/21244281/basic-nack-not-being-processed
ere is what I am trying to do:
1. Dequeue a message
2. Do an action with the message
3. If the action fails, put the message back in the queue
4. If the action succeeds, acknowldge the message
My problem right now is that, if the action fails, the message isn't
requeued, but stays unacknowledged. If I go in RabbitMQ web congifuration
interface, I see that the messages are flagged as unacknowledged, even tho,
the basic.Nack has been stepped over.
var delivery = subscription.Next();
var messageBody = delivery.Body;
try{
action.Invoke(messageBody);
subscription.Ack(delivery);}catch (Exception ex){
subscription.Model..BasicNack(delivery.DeliveryTag, false, true);
throw ex;}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140121/7a252d72/attachment.html>
More information about the rabbitmq-discuss
mailing list