You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any documentation or examples on methods to handle disconnect / reconnect scenarios? Specifically I'm interested in typical or suggested patterns or even an explanation of the behavior of basic_send when the server disconnects.
All classes inherited from aiormq.base.Base has a self.closing future.
So you have two options, wait for it in a background task, or use .closing.add_done_callback(callback). It's might be applicable for channels or connections.
I have some questions on how to handle the case when RabbitMQ goes down.
So I am consuming messages over TCP in one task and sending them over to anotther task to publish on RabbitMQ.
If i turn off RabbitMQ, send a TCP message and do a basic publish the task hangs forever.
When I turn off the RabbitMQ I get a "reader cancelled" debug output, but all errors are supressed so I cannot wait for that exception to reset the connection and start reconnect.
Right now I am solving it with ensuring the connection has a reader and a writer before the publish, but this could still fail.
I also don't get the TimeoutException from publish. This might be due to that in python 3.7 wait_for will still waits for the task to be cancelled (which seems to never happen) before they raise the TimeoutException
Any thoughts on how to make it a bit more robust? I can probably put in a PR but need som directions from maintainer on how they would like to fix it.
Is there any documentation or examples on methods to handle disconnect / reconnect scenarios? Specifically I'm interested in typical or suggested patterns or even an explanation of the behavior of
basic_send
when the server disconnects.Example: stomp.py has a
on_receiver_loop_ended
callback but that pattern probably isn't ideal with asyncio.The text was updated successfully, but these errors were encountered: