1

is there a way to get "reconnect" to rabbitMQ if connection lost? How can I reconnect to rabbitmq? What's the best way? Is there any "strategy"?

hmn Falahi
  • 730
  • 5
  • 22
  • 1
    This depends heavily on the use-case. It gets a lot trickier to handle graceful retries if you are consuming a lot and have a low tolerance for data loss. I usually apply something like this (sorry for a different library, but should work fine for pika as well) https://github.com/eandersson/amqpstorm/blob/master/examples/robust_consumer.py – eandersson Mar 09 '21 at 00:58

0 Answers0