<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>After further exploring it appears that you do this:</div>
<div>Using the BlockingConnection:</div>
<div>Receive Message</div>
<div>Run Handler to process message which can immediately ACK the message.</div>
<div>When Handler returns, next message is received from RabbitMQ.</div>
<div><br>
</div>
<div>Simpler!</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Scott Chapman <<a href="mailto:Scott.Chapman@servicenow.com">Scott.Chapman@servicenow.com</a>><br>
<span style="font-weight:bold">Reply-To: </span>Discussions about RabbitMQ <<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, February 20, 2013 12:50 PM<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>" <<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>><br>
<span style="font-weight:bold">Subject: </span>[rabbitmq-discuss] How to do blocking asynchronously with Pika? I want 1 message at a time and stop receiving until I'm ready again.<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>What's the best practice to make it so I receive a message in a single-threaded app, process it and don't get any more messages until I'm ready again?</div>
<div><br>
</div>
<div>Something like:</div>
<div><br>
</div>
<div>Receive Message</div>
<div>Turn off Channel – how best to do this?</div>
<div>Ack Message</div>
<div>Process Message</div>
<div>Turn on Channel</div>
<div>…. Back to the top.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Scott</div>
<div><br>
</div>
</div>
</div>
</span>
</body>
</html>