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

Function DeliverLastPerSubject

js.go:2557–2562  ·  view source on GitHub ↗

DeliverLastPerSubject configures a Consumer to receive messages starting with the latest one for each filtered subject.

()

Source from the content-addressed store, hash-verified

2555// DeliverLastPerSubject configures a Consumer to receive messages
2556// starting with the latest one for each filtered subject.
2557func DeliverLastPerSubject() SubOpt {
2558 return subOptFn(func(opts *subOpts) error {
2559 opts.cfg.DeliverPolicy = DeliverLastPerSubjectPolicy
2560 return nil
2561 })
2562}
2563
2564// DeliverNew configures a Consumer to receive messages
2565// published after the subscription.

Callers 2

WatchFilteredMethod · 0.85
WatchMethod · 0.85

Calls 1

subOptFnFuncType · 0.85

Tested by

no test coverage detected