Quantcast
Channel: Active questions tagged consumer - Stack Overflow
Viewing all articles
Browse latest Browse all 91

NATs consumer's max delivery setting is confusing

$
0
0

I have a NATs stream that has a workerQueue retention policy. This stream also imposes some limits like max age and max bytes. I have seen 2 warnings now in the NATs docs which seem alarming:

  1. They state in the stream docs that:

Messages that have attempted redelivery and have reached MaxDelivery attempts for the consumer will remain in the stream and must be manually deleted via the JetStream API.

  1. They also state the same thing in the consumer docs

Messages that have reached the maximum delivery count will stay in the stream.

They seem to be stating that even if the consumer has a max delivery setting of ex: 4, if those attempts have been made without an acknowledgment, the stream limits are not enforced? am I misreading that? They explicitly state that message have to be manually deleted meaning that the max age limit is definitely not imposed on these messages.

It seems to me that this is risky behavior as it guarantees an increase in memory usage by nats stream as unacknowledged message are bound to happen.

Update

Does setting the max delivery to -1 (unlimited retries) mean that the ma re delivery value is never reached, thus the stream limits are still imposed on it?

(might be the solution for this behavior)


Viewing all articles
Browse latest Browse all 91

Trending Articles