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

Method QueueSubscribe

js.go:1520–1525  ·  view source on GitHub ↗

QueueSubscribe creates a Subscription with a queue group. If no optional durable name nor binding options are specified, the queue name will be used as a durable name. See important note in Subscribe()

(subj, queue string, cb MsgHandler, opts ...SubOpt)

Source from the content-addressed store, hash-verified

1518// If no optional durable name nor binding options are specified, the queue name will be used as a durable name.
1519// See important note in Subscribe()
1520func (js *js) QueueSubscribe(subj, queue string, cb MsgHandler, opts ...SubOpt) (*Subscription, error) {
1521 if cb == nil {
1522 return nil, ErrBadSubscription
1523 }
1524 return js.subscribe(subj, queue, cb, nil, false, false, opts)
1525}
1526
1527// QueueSubscribeSync creates a Subscription with a queue group that can be used to process messages synchronously.
1528// See important note in QueueSubscribe()

Callers

nothing calls this directly

Calls 1

subscribeMethod · 0.95

Tested by

no test coverage detected