[rabbitmq-discuss] Pika disconnects

John Reuning john at ibiblio.org
Mon Oct 10 14:42:29 BST 2011


On Sat, Oct 8, 2011 at 8:50 AM, Marek Majkowski <majek04 at gmail.com> wrote:
>
> If you want to publish, you need to stop event loop,
> publish, and restart event loop. It doesn't matter
> which thread does what, but it matters that only
> one thread accesses pika stuff at a time.

I'm really only concerned with publishing.  Consuming happens using
another rabbitmq connection.  When you say stop the event loop, do you
mean the poll loop in IOLoop?  The reason I implemented multiple
threads for publishing was that the ioloop start() call doesn't
return.  Calling ioloop.start() seemed to be the only way to initiate
a rabbitmq connection for publishing.  Is there a non-blocking way to
establish a connection?  Should I call ioloop.start(), wait for the
channel/exchange/queue callbacks to occur, then call ioloop.stop()?  I
tried this, but the stop() call hangs.

Thanks,

-John


More information about the rabbitmq-discuss mailing list