-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Max reconnect attempts #247
base: master
Are you sure you want to change the base?
Conversation
d8d852d
to
71c5a59
Compare
71c5a59
to
af6aead
Compare
af6aead
to
e95bec8
Compare
e95bec8
to
d95a3cc
Compare
d95a3cc
to
4b940c2
Compare
@harlov please rebase this branch against master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be added to documentation
@@ -40,6 +40,10 @@ class QueueEmpty(AMQPError, asyncio.QueueEmpty): | |||
pass | |||
|
|||
|
|||
class MaxReconnectAttemptsReached(Exception): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, this class should be a subclass of ConnectionError
Any interest in moving this one ahead? I can help rebasing/testing if needed, but only if maintainers have interest in this feature. In my use case I need to stop a service if I lose connection (it will respawn later with correct parameters). But anything around adjusting the URL to reconnect could be useful too. |
PR adds a limit for reconnect attempts. It's useful in case then connect parameters have changed and we need gracefully shutdown and re-init client.