jsconsumer: export the effective AckWait/MaxDeliver resolution

main

Commit

nodo1mo ago

Config.MaxDeliver zero becomes DefaultMaxDeliver (8) on the JetStream consumer, but backoff.Policy reads a zero MaxDeliver as unlimited redeliveries — so a caller passing the raw field into a Policy would build one whose TermOnExhaustion never fires on the broker's real final delivery, orphaning work-queue messages (the COR-762 failure mode the policy exists to prevent).

Export the resolution as Config.EffectiveMaxDeliver / EffectiveAckWait (Start and Process already resolve through them), so a Policy is built from the value actually applied on the broker, and document the zero-value mismatch on EffectiveMaxDeliver. AckWait gets the same treatment for hand-wired natsmsg.KeepInProgress heartbeats, where a zero is a silent no-op.

Found by Bugbot on #4.

Entire-Checkpoint: 788ee0fc2a18 Entire-Checkpoint: 71b20e115766

Checkpoints

Unify NATS Consumer Backoff and Tracing

Claude CodeFable 5
View session
Checkpoint 1

JetStream Consumer AckWait MaxDeliver Export

CodexGPT-5.6-sol
View session
Checkpoint 2