Replies: 2 comments 2 replies
-
The |
Beta Was this translation helpful? Give feedback.
-
What I would do is use a pull consumer instead of a push. That way you can leave/set Max Acks Pending to something very high, but you are not relying on it do to flow control and instead the flow control is happening automatically because your clients use Fetch() (so for example if you have 10 clients each does Fetch(100) and the max 'in-flight' is 1000 (and you can also use MaxPullWaiting). |
Beta Was this translation helpful? Give feedback.
-
From the MaxAckPending doc below, does acknowledgement means only ACK and not NAK?
MaxAckPending implements a simple form of one-to-many flow control. It sets the maximum number of messages without an **acknowledgement** that can be outstanding, once this limit is reached message delivery will be suspended.
Currently, we have a stream with WorkQueue rentention policy, when the push consumer NAK (NAKWithDelay of 4 hour) a msg, the Outstanding Acks increases (say 5 out of maximum 1,000). Eventhough there is no inflight msg (not currently being processed by any process), but nats counts the NAKed msg towards outstanding. So this decreases the expected inflight msg limit. Is my understanding of the behavioutr correct? If so how can we have a steady 1000 inflight messages despite many NAKed messages (those will be waiting to be redelivered after 4 hours).
Thank you for any clarification.
Beta Was this translation helpful? Give feedback.
All reactions