NSQLookupd support for nsq_consumer #3215
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for NSQLookupd in
nsq_consumer
.Why:
Existing solution where
nsq_consumer
reads only from a single NSQD server limits ability to take advantages from distributed nature of NSQ.NSQ godocs suggest to use
nsqlookupd
as a prefered method for connection (https://godoc.org/github.com/nsqio/go-nsq#Consumer.ConnectToNSQD):nsqlookupd
is the daemon that manages topology information. Clients query nsqlookupd to discover nsqd producers for a specific topic and nsqd nodes broadcasts topic and channel information.With
nsqLookupd
supportnsq_consumer
will detect all avaiable nsqd producers and connects to all.Additionally sync with the latest stable release of
go-nsq
(https://github.com/nsqio/go-nsq/blob/master/ChangeLog.md#107---2017-08-04)Required for all PRs: