ChanQueueSubscribe will express interest in the given subject. All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message, which will be placed on the channel. You should not close the channel until sub.Unsubscrib
(subj, group string, ch chan *Msg)
| 4812 | // You should not close the channel until sub.Unsubscribe() has been called. |
| 4813 | // Note: This is the same than QueueSubscribeSyncWithChan. |
| 4814 | func (nc *Conn) ChanQueueSubscribe(subj, group string, ch chan *Msg) (*Subscription, error) { |
| 4815 | return nc.subscribe(subj, group, nil, ch, nil, false, nil) |
| 4816 | } |
| 4817 | |
| 4818 | // SubscribeSync will express interest on the given subject. Messages will |
| 4819 | // be received synchronously using Subscription.NextMsg(). |