Perfect, that will work great. Thanks a lot Gavin and Jason. <div><br></div><div>-Josh</div><div><br></div><div><br><br><div class="gmail_quote">On Tue, Jul 5, 2011 at 3:19 PM, Gavin M. Roy <span dir="ltr"><<a href="mailto:gmr@myyearbook.com">gmr@myyearbook.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Tue, Jul 5, 2011 at 5:04 PM, Joshua Braegger <<a href="mailto:rckclmbr@gmail.com">rckclmbr@gmail.com</a>> wrote:<br>
> Thanks, Jason.<br>
> I bring this up because of this comment<br>
> -- <a href="http://tonyg.github.com/pika/connecting.html#adapters-blocking-connection-blockingconnection" target="_blank">http://tonyg.github.com/pika/connecting.html#adapters-blocking-connection-blockingconnection</a><br>
> "Warning BlockingConnection is provided for legacy and learning purposes<br>
> only and it is not recommended that you use it for a production<br>
> application."<br>
> The latest git documentation also still has this warning<br>
> (<a href="https://github.com/pika/pika/blob/master/pika/adapters/base_connection.py" target="_blank">https://github.com/pika/pika/blob/master/pika/adapters/base_connection.py</a>)<br>
> "adapters.blocking_connection.BlockingConnection: Enables blocking,<br>
><br>
> synchronous operation on top of library for simple uses. This is not<br>
> recommended and is included for legacy reasons only."<br>
><br>
> So my question is, why isn't this recommended for production use?<br>
<br>
</div>In essence, you can but the main issue is it's a synchronous "hack" on<br>
top of an asynchronous stack using an asynchronous protocol. I am<br>
working on a revamped method of handling the blocking but it's taking<br>
a bit longer than I'd like.<br>
<br>
The best way to think of the BlockingConnection adapter is as a layer<br>
on top of the existing client that implements blocking behaviors.<br>
Every other adapter plugs into the driver.<br>
<br>
At the time I wrote that it was deprecated, I wasn't planning on<br>
keeping it long term. My impression of it and how to handle it has<br>
changed over time. Here's where I was in March:<br>
<a href="http://gavinroy.com/the-future-of-pika" target="_blank">http://gavinroy.com/the-future-of-pika</a>.<br>
<br>
I'd say you're fine using it if it works for you. I find that it's<br>
good for publishing a lot of messages quickly. If you're going to use<br>
it as a consumer, you're better off just doing the minimal work of<br>
using the asynchronous methods because you'll be working with the<br>
asynchronous callback in the blocking connection anyway. I'll be<br>
supporting bug fixes in the 0.9 tree but my focus on Pika and heart is<br>
in a cleaner implementation.<br>
</blockquote></div><br></div>