nsqio / go-nsq

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

docs: what address in `func NewProducer(addr string, ...)`? #309

Closed golopot closed 3 years ago

golopot commented 4 years ago

I just learnt nsq yesterday. I have a problem when I use the function NewProducer(addr, config): Which address should I use, the nsqdlookupd one or the nsqd one?

// NewProducer returns an instance of Producer for the specified address
// ...
func NewProducer(addr string, config *Config) (*Producer, error) {
ploxiln commented 4 years ago

addr is a single nsqd tcp address (yes, the docs should be clearer about that)