Update on this: I came across the BlockingConnection.process_data_events() method, which seems to do the trick if I insert it into my loop.<br><br>However, it doesn't look like an "official" API, in that I don't see it described anywhere, and the only search results I get for it are its inclusions in various callstacks.<br>
<br>Gavin (or whomever else wants to comment): What are your thoughts on this?<br><br>Thanks,<br><br>Matt<br><br><div class="gmail_quote">On Fri, Aug 17, 2012 at 3:52 PM, Matt Pietrek <span dir="ltr"><<a href="mailto:mpietrek@skytap.com" target="_blank">mpietrek@skytap.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm got a scenario where I use a dedicated thread to write a series of messages in a loop. This thread uses BlockingConnection, calls add_on_return_callback for its channel, and when publishing, uses the mandatory=True flag.<br>
<br>I want to know when a message is being returned. However, I can't figure out what to call within my loop to give Pika the opportunity to see the Basic.Return message and invoke the callback.<br><br>I've verified via WireShark that the Basic.Returns are coming back from the broker. However, I can't figure out what the moral equivalent of calling ioloop.start() is, so as to give Pika the an opportunity to process the basic.return messages, but without blocking indefinitely. Just for kicks I tried calling Channel.basic_get() within the loop, and (as expected), I didn't get the returned message callbacks.<br>
<br>Thanks,<br><br>Matt<br><br>
</blockquote></div><br>