nsqio / go-nsq

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

consumer can not be received the message in real time from the nsqds that have the same topic #173

Closed celeskyking closed 8 years ago

celeskyking commented 8 years ago

If there are two NSQD that have the same topic, and at the same time to send different messages to the topic, consumer can only be received message from one producer, received from another one only occurs when the querying the lookupd.

jehiah commented 8 years ago

@celeskyking nsq consumers are designed to keep persistent connections open to all nsqd nodes that have the topic they are interested in.

To receive more than one message concurrently aka "real time" (ie: so you can get one message at a time from each of two nsqd nodes in your case) you would adjust the consumer setting for Max In Flight.

celeskyking commented 8 years ago

@jehiah Thanks, it worked.