Channel Closed or channel closed or pika.exceptions.StreamLostError #1449
Replies: 2 comments
-
You need to run your Pika is not thread-safe, so you will have to use the Rather than post snippets from your django web application, you can / should create a simple application that demonstrates what you're doing. If you make it available via GitHub I can then fork it and provide suggestions, and even run it locally. |
Beta Was this translation helpful? Give feedback.
-
The easiest way for you is to create instance of RabbitMQ right before publishing and close connection after publishing. If you want to use only one connection, then use LongRunningPublisher class https://github.com/pika/pika/blob/main/examples/long_running_publisher.py |
Beta Was this translation helpful? Give feedback.
-
I am trying to publish a message when new user registered in my system . But most of time when try to publish using pika got this error
after some trying it works then within a minutes it stops working again .
here is my all code :
producer.py
Usage
RabbitMq log
Any help where is the problem. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions