<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>Thanks Scott. But I do want to subscribe/consume (I think), as it is unknown whether there will be any data in the queue, and I want to be notified immediately when there is. I don't really want to poll rabbit using a basic.get and would rather be notified asynchronously when new items are in the queue. I have hundreds (thousands soon) of queues waiting for data across a cluster and the polling overhead would be higher than I want it to be.<div><br></div><div>-JD<div><br>----- Original Message -----<br>From: "Scott Brooks" &lt;scott.brooks@epicadvertising.com&gt;<br>To: "JD Conley" &lt;jdc@hive7.com&gt;<br>Cc: rabbitmq-discuss@lists.rabbitmq.com<br>Sent: Monday, November 16, 2009 6:59:35 PM GMT -08:00 US/Canada Pacific<br>Subject: Re: [rabbitmq-discuss] how to consume one message at a time<br><br>I'm not sure what the .NET api looks like, but you want to do a basic get, rather then a basic subscribe.<br><br>It will return a single message from the queue, and then when you call it again, you will get the next message(or null/something similar)<br><br>Scott<br><br>On 2009-11-16, at 5:41 PM, JD Conley wrote:<br><br>&gt; I'm using the .NET client and can't figure out how to consume only one<br>&gt; message at a time. Basically I would like to simply:<br>&gt; <br>&gt; 1. Consume one message from a queue<br>&gt; 2. Cancel consumption so I don't lose any messages<br>&gt; <br>&gt; My confusion comes with the statement in the user guide that "Application<br>&gt; callback handlers must not invoke blocking AMQP operations (such as<br>&gt; IModel.QueueDeclare or IModel.BasicCancel). If they do, the channel will<br>&gt; deadlock." But, a BasicCancel is precisely what I want to do in the<br>&gt; callback.<br>&gt; <br>&gt; I want to use the EventingBasicConsumer. What would be the best way to<br>&gt; accomplish this? Which options do I set? <br>&gt; <br>&gt; -JD<br>&gt; <br>&gt; <br>&gt; _______________________________________________<br>&gt; rabbitmq-discuss mailing list<br>&gt; rabbitmq-discuss@lists.rabbitmq.com<br>&gt; http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss<br><br></div></div></div></body></html>