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

Manual reconnect #308

Open
stimka opened this issue Apr 16, 2020 · 2 comments
Open

Manual reconnect #308

stimka opened this issue Apr 16, 2020 · 2 comments

Comments

@stimka
Copy link

stimka commented Apr 16, 2020

Is it possible to reconnect to rabbitmq when it was been restarted or something else?

@bashleigh
Copy link
Collaborator

You mean when rabbitmq restarts? I'm not sure? I've only really worked in environments where if a container was to die (when a connection is lost) it's restarted. If the connection is lost, it should really attempt a reconnect

@stimka
Copy link
Author

stimka commented Apr 20, 2020

If I kill tcp connection to rabbit, it throw "Error: Unexpected close" from "/amqplib/lib/connection.js:272" and my service drops. I can handle this error with connection.on('error'), but how to reconnect in this case.

Additional question: if a container with rabbit starts after my app service i see "Unable to connect to amqp server. Retrying". But it never connect. Ima init module with "retrys": 15,"retryDelay": 10000. I'm doing something wrong?

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

No branches or pull requests

2 participants