Close() Method For Pika Selectconnection Adaptor Doesn't Close The Connection
I have a simple asynchronous consumer for AMQP/RabbitMQ, written in Python using the Pika library and based on the Asynchronous consumer example from the Pika docs. The main differ
Solution 1:
If you're sharing the connection between your threads this can cause problems. pika
is not thread safe and connections shouldn't be used by different threads.
First bit of the FAQ:
Q:
Is Pika thread safe?
A:
Pika does not have any notion of threading in the code. If you want to use Pika with threading, make sure you have a Pika connection per thread, created in that thread. It is not safe to share one Pika connection across threads.
Post a Comment for "Close() Method For Pika Selectconnection Adaptor Doesn't Close The Connection"