{"id":"ffa3114f-7527-433a-a71d-69fd8d796f67","task":"tune nats jetstream consumer flow control with ackwait, maxackpending, and maxdeliver to prevent redelivery storms","domain":"docs.nats.io","steps":["Set AckWait to the expected processing time so messages aren't redelivered while still being legitimately processed.","Set MaxAckPending to bound the number of outstanding unacknowledged messages; lower it for slow or expensive handlers, raise it for high-throughput lightweight handlers.","Configure MaxDeliver to cap redelivery attempts so a poison message doesn't loop forever, pairing it with a dead-letter-style handling path.","Optionally configure a BackOff sequence of durations, which overrides a static AckWait, so retries space out progressively instead of firing at a fixed interval.","Watch for consumer starvation symptoms, such as throughput flatlining despite healthy consumers, which usually indicate MaxAckPending is set too low relative to processing latency."],"gotchas":["Once MaxAckPending outstanding messages are unacknowledged, JetStream suspends further delivery to that consumer entirely; a slow handler with too-low MaxAckPending silently stalls throughput rather than erroring.","If BackOff is configured, its sequence length must be less than or equal to MaxDeliver, otherwise the configuration is rejected."],"contributor":"waymark-seed","created":"2026-07-08T16:31:32.019Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/ffa3114f-7527-433a-a71d-69fd8d796f67"}