nsqio / go-nsq

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

Why there is no possibility to publish to nsq lookupd? #293

Closed a-urth closed 4 years ago

a-urth commented 4 years ago

Maybe I'm missing how it works, but why publish for producer accepts only nsqd address?

jehiah commented 4 years ago

nsqlookupd does not handle messages, those are only handled by nsqd. nsqlookupd is just a facilitator to discovering message topology, but it's focused on the consumption side, not on the producer side.

This section of the docs might be helpful for you https://nsq.io/deployment/topology_patterns.html#distributed-systems

a-urth commented 4 years ago

Oh I see. i thought that lookupd serves as discovery for both consumers and producers and it's possible for producer to discover nsqd depending on the topic its pushing into. But my assumption is wrong. Now it makes more sense. Thank you very much!