nats-io / nats-server

High-Performance server for NATS.io, the cloud and edge native messaging system.
https://nats.io
Apache License 2.0
16.01k stars 1.41k forks source link

[FIXED] Max delivered stuck consumers and mis-reported redelivered stats. #5995

Closed derekcollison closed 1 month ago

derekcollison commented 1 month ago

Process max delivery boundaries when expiring vs always putting back on the redelivered queue.

Previously we would always re-queue and do this on getNextMsg() which worked well for push consumers, but with pull based consumers would require a new pull request to be present to process any redelivered and this could report redelivered status incorrectly on max deliver of 1.

Signed-off-by: Derek Collison derek@nats.io