[rabbitmq-discuss] how to consume one message at a time

JD Conley jdc at hive7.com
Mon Nov 16 22:41:29 GMT 2009


I'm using the .NET client and can't figure out how to consume only one
message at a time. Basically I would like to simply:

1. Consume one message from a queue
2. Cancel consumption so I don't lose any messages

My confusion comes with the statement in the user guide that "Application
callback handlers must not invoke blocking AMQP operations (such as
IModel.QueueDeclare or IModel.BasicCancel). If they do, the channel will
deadlock." But, a BasicCancel is precisely what I want to do in the
callback.

I want to use the EventingBasicConsumer. What would be the best way to
accomplish this? Which options do I set? 

-JD





More information about the rabbitmq-discuss mailing list