-
Notifications
You must be signed in to change notification settings - Fork 1k
Reconnection guidelines - graceful dropped connection handling on consumer #444
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
Comments
It's not a good example to keep calling a function from within itself. You'll end up with a stack overflow error. If you write a full example then there are actually many things to take into consideration:
The following is a heavily edited (simplified) version of what I'm using, but should give you an idea. Essentially there's an outer loop that continually tried to get a connection until something in the code says "Connection Not Longer Required". If the connection dies then trap the SPECIFIC exception and handle it.
|
As of |
@RobbieLePommie Hey man, thanks so much for this :) This really helped a lot! |
Hoping to clarify best practices in reconnecting a consumer after a dropped connection, service outage, etc. Following this basic pattern:
I've tried a number of things and can't seem to get my AMQPChannel::wait() to resume. I'd be happy to add it to the examples if anyone can clarify.
The text was updated successfully, but these errors were encountered: