[rabbitmq-discuss] Using Pika and PyQtGraph (Qt event loop and BlockingConnection)

Ask Solem ask at rabbitmq.com
Tue May 13 15:07:14 BST 2014


On May 13, 2014, at 2:54 PM, Michael Klishin <mklishin at gopivotal.com> wrote:

>  On 12 May 2014 at 00:34:58, Femto (femto.trader at gmail.com) wrote:
>>> maybe you noticed Qt have an event loop
>> 
>> and I think it's doing odd things with pika.BlockingConnection  
>> 
>> 
>> Any help is welcome.
> 
> I doubt that it can, although I know nothing about Qt and little about
> Pika implementation.
> 
> Have you tried using a different connect, e.g. Tornado?

If PyQt does indeed use an event loop then you will not be able to use a blocking connection.

You have several choices:

1) Implement a pika connection implementation using the PyQt event loop.
2) Use a “eventlet on pyqt” or “gevent on pyqt” implementation like eventlet-pyqt
    and use the eventlet or gevent connection in pika.
3) Run pyqt in a separate thread.  This is only an option if pyqt actually supports it, which may
    very well not be the case.



More information about the rabbitmq-discuss mailing list