[rabbitmq-discuss] BasicReject(deliveryTag, false) message stays in queue..

Burtsev Aleksey brokenpipe.coder at gmail.com
Tue Aug 6 13:15:08 BST 2013


I'm using RabbitMQ  3.1.3 with .NET client library.

I'm receiving messages using BasicConsume which puts them in List, then I 
take them from a List in other thread, and do:
channel.TxStart()
try
{
HandleMessage(qMessage);
channel.BasicAck(qMessage.DeliveryTag)
}
catch
{
 channel.BasicReject(qMessage,DeliveryTag, false); //I want to delete 
messages I can't process
}
finally
{
channel.TxCommit();
}

Message is marked as Nack, but it remains in queue, and when channel is 
closed message returns to Ready state.

I'm pulling hairs out of my head how such simple 3 lines of code couldn't 
work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130806/1485429c/attachment.htm>


More information about the rabbitmq-discuss mailing list