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

Method PullSubscribe

js.go:1551–1557  ·  view source on GitHub ↗

PullSubscribe creates a Subscription that can fetch messages. See important note in Subscribe()

(subj, durable string, opts ...SubOpt)

Source from the content-addressed store, hash-verified

1549// PullSubscribe creates a Subscription that can fetch messages.
1550// See important note in Subscribe()
1551func (js *js) PullSubscribe(subj, durable string, opts ...SubOpt) (*Subscription, error) {
1552 mch := make(chan *Msg, js.nc.Opts.SubChanLen)
1553 if durable != "" {
1554 opts = append(opts, Durable(durable))
1555 }
1556 return js.subscribe(subj, _EMPTY_, nil, mch, true, true, opts)
1557}
1558
1559func processConsInfo(info *ConsumerInfo, userCfg *ConsumerConfig, isPullMode bool, subj, queue string) (string, error) {
1560 ccfg := &info.Config

Callers

nothing calls this directly

Calls 2

subscribeMethod · 0.95
DurableFunction · 0.85

Tested by

no test coverage detected