Closed borodiychuk closed 3 years ago
It is a somewhat common pattern to sometimes call this with an empty list, as part of allowing either nsqd-tcp-address or lookupd-http-address lists:
https://github.com/nsqio/nsq/blob/master/apps/nsq_tail/nsq_tail.go#L124
https://github.com/nsqio/nsq/blob/master/apps/nsq_to_http/nsq_to_http.go#L289
Oh, I see, it makes sense, yes.
It's reasonable to question :)
If empty nsqlookupd servers list is
ConnectToNSQLookupds
is provided, then Consumer instantiation does not fail, which is confusing. This PR makes it return an error for such case.