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

Auto Restart #43

Closed
gitteraz opened this issue Mar 29, 2019 · 2 comments
Closed

Auto Restart #43

gitteraz opened this issue Mar 29, 2019 · 2 comments

Comments

@gitteraz
Copy link

Hi,

Thank you for your Library. This is more of a question.

How do i configure the instance to reconnect automatically in case of a connection error in production.

Thanks in advance

@lillem4n
Copy link
Member

Hi! Oh, that is a tricky question.

I'd catch the error and if one occurs, restart the app.

When implementing this, I'm using a queue handler to feed the messages, so the queue handler is responsible for knowing when the message really was sent (from the callback). That way it is safe to restart the application in case of a connection error. Worst case a message gets double sent.

@gitteraz
Copy link
Author

gitteraz commented Apr 1, 2019

Thank you for your answer. Will follow that path

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