MCPcopy
hub / github.com/nats-io/nats.go / QueueSubscribe

Method QueueSubscribe

nats.go:4836–4838  ·  view source on GitHub ↗

QueueSubscribe creates an asynchronous queue subscriber on 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 asynchronously.

(subj, queue string, cb MsgHandler)

Source from the content-addressed store, hash-verified

4834// only one member of the group will be selected to receive any given
4835// message asynchronously.
4836func (nc *Conn) QueueSubscribe(subj, queue string, cb MsgHandler) (*Subscription, error) {
4837 return nc.subscribe(subj, queue, cb, nil, nil, false, nil)
4838}
4839
4840// QueueSubscribeSync creates a synchronous queue subscriber on the given
4841// subject. All subscribers with the same queue name will form the queue

Callers 1

TestNilConnectionFunction · 0.95

Calls 1

subscribeMethod · 0.95

Tested by 1

TestNilConnectionFunction · 0.76