Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

harlov
Copy link

@harlov harlov commented Sep 11, 2019

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.

@harlov harlov force-pushed the max_reconnect_attempts branch 3 times, most recently from d8d852d to 71c5a59 Compare September 12, 2019 07:24
@harlov harlov force-pushed the max_reconnect_attempts branch from 71c5a59 to af6aead Compare September 12, 2019 11:05
@harlov harlov force-pushed the max_reconnect_attempts branch from af6aead to e95bec8 Compare September 13, 2019 07:08
@harlov harlov force-pushed the max_reconnect_attempts branch from e95bec8 to d95a3cc Compare November 15, 2019 12:51
@harlov harlov force-pushed the max_reconnect_attempts branch from d95a3cc to 4b940c2 Compare November 15, 2019 13:02
@decaz decaz changed the title max reconnect attempts Max reconnect attempts Nov 19, 2019
@mosquito
Copy link
Owner

@harlov please rebase this branch against master.

Copy link
Collaborator

@dizballanze dizballanze left a 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):
Copy link
Collaborator

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

@roperto
Copy link

roperto commented Sep 23, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants