[rabbitmq-discuss] RabbitMQ .NET client BasicConsume and HandleBasicDeliver question
tranzenziuzex at gmail.com
Wed Jun 15 10:08:27 BST 2011
We are overriding DefaultBasicConsumer.HandleBasicDeliver method and
use IModel.BasicConsume to subscribe to incoming messages:
model.BasicConsume(queue, false, instanceOfDerivedConsumer);
When application fails to ack a message that message is requeued. How
can I guarantee that BasicConsume is receiving one message at a time?
How to deterministically stop consuming when application detects that
it is unable to process a message and prevent the second message from
arriving? How to make sure that there is one and only one unacked
message and that message is at the peak of broker queue.
Currently we are trying to close the model (channel) in
HandleBasicDeliver override, but then it blocks and does not seem to
be a right solution.
More information about the rabbitmq-discuss