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

Method SubscribeSync

js.go:1512–1515  ·  view source on GitHub ↗

SubscribeSync creates a Subscription that can be used to process messages synchronously. See important note in Subscribe()

(subj string, opts ...SubOpt)

Source from the content-addressed store, hash-verified

1510// SubscribeSync creates a Subscription that can be used to process messages synchronously.
1511// See important note in Subscribe()
1512func (js *js) SubscribeSync(subj string, opts ...SubOpt) (*Subscription, error) {
1513 mch := make(chan *Msg, js.nc.Opts.SubChanLen)
1514 return js.subscribe(subj, _EMPTY_, nil, mch, true, false, opts)
1515}
1516
1517// QueueSubscribe creates a Subscription with a queue group.
1518// If no optional durable name nor binding options are specified, the queue name will be used as a durable name.

Callers

nothing calls this directly

Calls 1

subscribeMethod · 0.95

Tested by

no test coverage detected