Tag:linuxgolang
Article From:https://segmentfault.com/q/1010000012143023
Question:

Recently, in learning the principle and use of NSQ, the model for the consumer and NSQ message interaction is not very clear. On the official document, if there are multiple consumers on a channel, then the message can only be received by a random consumer, so what is the meaning of this design, if I do?Do you want multiple consumers to receive messages under the same topic, and only allow them to be in different channel? Then why should I put the consumer in a channel?
The official website also said that such a design can achieve the load balance of consumers. What does it mean?

Answer 0:

A channel represents a consumption logic. I don’t understand why you can’t accept a topic and multiple channel models.
As for load balancing, it means that if the consumers of multiple servers topic and channel are the same, each message will be consumed by a random consumer only to reduce the pressure of a single server.

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *