Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About creating a new producer #280

Closed
stair-go opened this issue Dec 25, 2019 · 4 comments
Closed

About creating a new producer #280

stair-go opened this issue Dec 25, 2019 · 4 comments
Labels

Comments

@stair-go
Copy link

Why not provide a

NewProducerByLookup (lookupdaddrs [] string, config * config) (* producer, error)

and when the connected nsqd is hung up and then connected to a new nsqd, I think this scenario should be more common~hh

@stair-go
Copy link
Author

I think the design principle of NSQ is related. For example, if one MSG is sent to another nsqd without the topic, if there are multiple consumers subscribing to it, the message may be lost, but we can provide users with more choices?

@cocktail18
Copy link

I am puzzled with it too

@ploxiln
Copy link
Member

ploxiln commented Jan 8, 2021

Producers should not use nsqlookupd. Consumers use nsqlookupd. Producers might always publish to localhost, or they might publish to a configured pool of nsqd (which might be behind a load balancer, or contacted directly with logic like #311). Then, consumers user nsqlookupd to find where producers put messages.

@ploxiln
Copy link
Member

ploxiln commented Jan 8, 2021

You can find an example of "publish to localhost, consumers use nsqlookupd" near the bottom of this page: https://nsq.io/deployment/topology_patterns.html#distributed-systems

@jehiah jehiah closed this as completed May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants