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)
| 3675 | // of redeliveries by passing nats.MaxDeliver when you Subscribe. |
| 3676 | // The default is infinite redeliveries. |
| 3677 | func (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. |