Open mlmarius opened 6 years ago
ConnectionError('Auto Reconnect Error')
will be set to all undone futures.
In the case when connect_robust
using, the connection state will be repared.
Thanks! Is there a way for me to retrieve that error and set the reconnect interval ?
The Connect.add_close_callback
adds callback which will be called when connection lost.
The RobustConnection()
class accept the reconnect_interval=
keyword argument, this might be passed like this: connect_robust(..., reconnect_interval=0.1)
@mosquito
Can you help please with a case, when a server drops the connection? In that case RobustConnection()
tries to reconnect to the same server and don't call close_callback
.
In that case, I want to connect to another server, but I can't raise some Exceptions in close/reconnect callbacks because they didn't call.
It seems to be a good idea to add some parameter like reconnect=True
to RobustConnection()
for cases when I don't want to reconnect to the same rmq server.
I am running the "Simple consumer" example from the quick start. My consumer connects to the MQ but when I force disconnect it from the MQ I see the following logging output:
Future exception was never retrieved future: <Future finished exception=ConnectionError('Auto Reconnect Error')> ConnectionError: Auto Reconnect Error
How can I handle this cleanly and how can I control the reconnection attempt logic? (number of retries and time waiting between retries)