Why does asynchronous connection in Pika give better performance than the blocking one?

215 views
Skip to first unread message

Fan Jiang

unread,
Aug 19, 2014, 10:34:23 AM8/19/14
to rabbitm...@googlegroups.com
Hi everyone,

I see most people suggest using async connection instead of the blocking one in Pika because it brings much better performance. But I think I'm not clear about the exact reason why the async connection outperforms the blocking one. Are there any cases in which the blocking one is better? Any ideas?

Thank you very much!

Cheers,
Fan

Gavin M. Roy

unread,
Aug 19, 2014, 11:51:02 AM8/19/14
to rabbitm...@googlegroups.com, Fan Jiang
Because pika is an asynchronous library at its core and the BlockingConnection tries to implement blocking semantics on top of the async bits and doesn’t do so very well.

I expect that pika 0.10 will address most if not all of the performance issues with BlockingConnection. I currently do not have an ETA for it.

If you want to use non-async, pythonic code for RabbitMQ, I’d suggestion you take a look at rabbitpy: rabbitpy.readthedocs.org

Gavin
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fan Jiang

unread,
Aug 19, 2014, 12:12:10 PM8/19/14
to Gavin M. Roy, rabbitm...@googlegroups.com
Hi Gavin,

Thank you for the explanation! 

Cheers, 
Fan
--
Sincerely,
Fan Jiang

Master of Science in Information Science
School of Library and Information Science
University of North Carolina at Chapel Hill
(919)-360-1047
Reply all
Reply to author
Forward
0 new messages