[rabbitmq-discuss] Pika and threads

Marek Majkowski majek04 at gmail.com
Tue Jul 19 11:37:47 BST 2011


2011/7/17 Alex Grönholm <alex.gronholm at nextday.fi>:
> I wanted to use Pika to implement an RPC server using RabbitMQ. I found that
> this was however not possible because when I process the request in a
> thread, I have no good way to thread safely send the results back.

Isn't that the point of RPC? To stop the request process/thread until
the response comes back.

> The IOLoop lacks a mechanism for interrupting it directly. The best I could
> figure was setting a timeout of 0, but it might take up to a second for this
> to happen, considerably adding to the response latency.
> Why isn't there just a dummy signalling socket that could be used for
> interrupting the poll?

In the tutorials I was using BlockingConnection:

Is that of any use to you?


More information about the rabbitmq-discuss mailing list