Closed greatvovan closed 7 years ago
Hi @greatvovan, I have the same problem and I am trying this approach from pika library using futures and add_done_callback. If it works, I'll let you know.
Honestly, without reading your code, it's impossible to say where the issue is. The code in #65 is what I have had in production for months now and it's pretty robust.
Like I said in #65, the on_error
callback is busted, don't use it.
If you can't provide a sample code that breaks, there's nothing I can do to help you out. Sorry.
What is the correct approach of keeping application running in case of Rabbit connection problems? I am imitating connection issues by disconnecting network cable (or enabling/disabling network adapter in Windows).
I tried:
heartbeat=30
,on_error
callback,Neither of this makes library reconnect in my test case. I am getting the following results:
on_error
callback does not fire,on_error
fires, but any further call to protocol function (includingconnect()
) hangs forever, and eventually:In the first case it is even impossible to identify that a problem exists, as everything looks like just there is no messages. Does anybody have any idea?
My environment: