nsqio / go-nsq

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

consumer: any way to multiplex subscriptions to topics/channels over a single connection? #299

Closed umialpha closed 4 years ago

umialpha commented 4 years ago

From the code, it seems that every time we create a consumer for some topic and channel, it will create connections to nsqd. Is there any way to share the connections?

jehiah commented 4 years ago

nsqd does not currently support subscribing to more than one topic/channel on a TCP connection; That is the constraint that limits re-using connections.

umialpha commented 4 years ago

Thanks for your reply. The server seems to treat each connection as a client.