jsconsumer: bound prefetch; KeepInProgress forces one in-flight message

main

Commit

nodo1mo ago

Consume ran with nats.go's default 500-message client-side buffer while callbacks dispatch serially, and AckWait runs from server delivery into that buffer — so every delivery queued behind a long handler could exhaust its AckWait unextended and redeliver concurrently to another replica. That defeats KeepInProgress in particular: the heartbeat covers only the message the handler holds. The entiredb consumers the heartbeat was lifted from all pair it with FetchBatch=1; this restores that pairing.

KeepInProgress now forces PullMaxMessages(1) (a conflicting explicit MaxMessages is a Start error), and Config.MaxMessages exposes the bound for consumers that want it without the heartbeat — which the entiredb migration needs anyway for natsx FetchBatch parity.

Entire-Checkpoint: 71b20e115766

Checkpoints

Unify NATS Consumer Backoff and Tracing

Claude CodeFable 5
View session
Checkpoint 1