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

Method NakWithDelay

js.go:3677–3682  ·  view source on GitHub ↗

Nak negatively acknowledges a message. This tells the server to redeliver the message after the give `delay` duration. You can configure the number of redeliveries by passing nats.MaxDeliver when you Subscribe. The default is infinite redeliveries.

(delay time.Duration, opts ...AckOpt)

Source from the content-addressed store, hash-verified

3675// of redeliveries by passing nats.MaxDeliver when you Subscribe.
3676// The default is infinite redeliveries.
3677func (m *Msg) NakWithDelay(delay time.Duration, opts ...AckOpt) error {
3678 if delay > 0 {
3679 opts = append(opts, nakDelay(delay))
3680 }
3681 return m.ackReply(ackNak, false, opts...)
3682}
3683
3684// Term tells the server to not redeliver this message, regardless of the value
3685// of nats.MaxDeliver.

Callers

nothing calls this directly

Calls 2

ackReplyMethod · 0.95
nakDelayTypeAlias · 0.85

Tested by

no test coverage detected