Skip to content
Discussion options

You must be logged in to vote

Use msg.metadata.num_delivered(nats-py 2.16.0, nats-server 2.12) The server counts each delivery. Headers are part of the stored message, so a nak cannot change them.

  • nak(delay=0.2) 3 times - num_delivered is 1, 2, 3
  • ConsumerConfig(max_deliver=3) - no 4th delivery

For a hard limit, set max_deliver on the consumer.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@static-moonlight
Comment options

Answer selected by static-moonlight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants