Closed dbartenstein closed 9 months ago
It might be the missing durable=True
when declaring queues!
queue = await channel.declare_queue(queue_name, passive=True, durable=True)
See https://aio-pika.readthedocs.io/en/latest/apidoc.html#aio_pika.Channel.declare_queue
It might be the missing
durable=True
when declaring queues!queue = await channel.declare_queue(queue_name, passive=True, durable=True)
See https://aio-pika.readthedocs.io/en/latest/apidoc.html#aio_pika.Channel.declare_queue
First tests on integration show that with durable=True
the desired re-connection behavior is achieved! I will keep you posted.
Deployed on production today. Looks good so far!
Hi aio-pika community! :wave:
We are having one push queue listener running as daemon, which connects to multiple (~10 currently) RabbitMQ brokers with three queues each. So ~30 queues currently and growing ...
Our current implementation using aio-pika has been running for more than a year now and works nicely, but does not seem to be able to handle reconnects, e.g. when RabbitMQ brokers are restarted. Some recent messages after which no reconnection happened:
I browsed through the documentation (e.g. https://aio-pika.readthedocs.io/en/latest/quick-start.html#asynchronous-message-processing) but could not find a matching use case.
Core questions
connect_robust
?Let me share some code fragments: main-loop of the listener:
Consumer-class connecting to multiple RabbitMQ brokers and three queues each:
Thanks a lot for any hints! :bow: If helpful, I am happy to create a simplified sample for the project’s documentation for the use case "Multiple RabbitMQ broker connections with multiple queues each" :page_facing_up: