segmentio / nsq.js

NSQ client for nodejs
203 stars 34 forks source link

Reconnection to dead nsqd nodes #77

Open thelinuxlich opened 7 years ago

thelinuxlich commented 7 years ago

It's more a curiosity about how this happens, shouldn't the nsqd nodes reconnect once network is okay, since they heartbeat every X seconds the nsqlookupd hosts? I would like to know if this is related to https://github.com/nsqio/nsq/issues/851

thomasmodeneis commented 7 years ago

Hi, You mean errors like: NSQ Writer closed ? I've solved this just by doing process.exit(1) when this kind of error happens and then have the node restarted by the container processor.

doron2402 commented 7 years ago

I think the client shouldn't fail because of NSQ restarting itself, the client should be handle that and create a new connection