nsqio / go-nsq

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

consumer: make query nsqlookupd timeouts configurable #211

Closed guyannanfei25 closed 9 months ago

guyannanfei25 commented 7 years ago

when network is not well, 2 seconds may not be able dail success. Use nsq.Config.DialTimeout to configure this parameter

mreiferson commented 7 years ago

I think this is a good change, thanks for the contribution! However, I don't think we should lean on the existing DialTimeout.

Can we add new LookupdDialTimeout and LookupdRequestTimeout and thread those into the transport instantiation?

guyannanfei25 commented 7 years ago

I think DialTimeout means parameter for all connections. Considering lookupds and nsqds are usually in same idc, the network condition is same. Besides even not in same idc, DialTimeout sets a little bigger do no harm for the ones in good network condition. Do we need new LookupdDialTimeout and LookupdRequestTimeout parameters ?

mreiferson commented 7 years ago

My thinking is that if we're going to improve this, might as well do it completely and in an obvious way.

jehiah commented 9 months ago

replaced by #360