-
Notifications
You must be signed in to change notification settings - Fork 75
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 reconnect if writer failed to connect to NSQ #69
Comments
Is there any update about this issue and do you accept a PR for this one? I think this feature would be handy. |
I think it's worth addressing since it's a common concern. I'll hopefully get to it soon. |
Is there any update on this issue? In production, it becomes very critical. Application gets hanged and not responding to any requests. Even in development, writer gets closed if machine went to sleep. |
I'll work on a solution today. As a workaround, you can listen for the close event and then reconnect. It's not elegant but it will work. That's effectively what the implementation will be within the Reader. |
Thanks @dudleycarr. Currently i just did worst workaround of |
@dudleycarr is there any update on this issue? |
Just to add, I also believe it would be a useful addition (to both Reader and Writer). I worked around it manually for now by wrapping the nsqjs library. |
As a workaround it is possible to use https://www.npmjs.com/package/retry to reconnect. It is easy to set listener for Any chance to have it landed soon? /cc: @dudleycarr |
I'm also facing same problems here:
@oaleynik this retry project is real nice, thanks for the tip. Only missing now is buffer the incoming messages as you just mentioned! 👍 |
@dudleycarr when resolve this issue? |
bump |
Happens to me too |
There is a wrapper npm that provide auto-reconnection. |
Once it is disconnected from NSQ(Manually kill the NSQ server), the 'closed' event has been triggered in the writer. Then start NSQ server, again. But writer failed to reconnect the server. It throws following error
It will be great if you have auto reconnect in the Writer. Is there any other method to do it?
The text was updated successfully, but these errors were encountered: