nsqio / go-nsq

The official Go package for NSQ
MIT License
2.59k stars 444 forks source link

will consumer reconnect to the server when the connection is closed by server? #304

Closed pengbinbin1 closed 4 years ago

pengbinbin1 commented 4 years ago

will consumer reconnect to the server when the connection is closed by server? and how to set the reconnect times ?

ploxiln commented 4 years ago

If you use ConnectToNSQLookupd() or ConnectToNSQLookupds(), then yes, the Consumer will reconnect. The period for checking for new or no-longer-connected nsqd is controlled by LookupdPollInterval in the Config

pengbinbin1 commented 4 years ago

@ploxiln thank you very much