jsconsumer: durable JetStream pull-consumer scaffold

main

Commit

nodo1mo ago

Lift entire-api's internal/jsconsumer: Start (create-or-update durable, AckExplicit, bounded AckWait/MaxDeliver, filter subject, consume, stop on context cancel), Runner.Stop, and the Process[E] per-message prologue (consumer span re-parented across the NATS hop via natsmsg, decode, Term-on-undecodable, dispatch to the handler which owns disposition).

Two folds over the entire-api original, per COR-929: consume errors are gated by nuts.IsShutdownFetchErr so a drain during rollout logs nothing (COR-923 posture), and Config.KeepInProgress opts a consumer into the capped natsmsg AckWait heartbeat around handle. Service-local deps became Config fields: Tracer/Logger (defaulting to the OTel global and slog.Default) replace otelsetup, and AckWait is configurable (default 30s, the posture the migrated consumers share).

Entire-Checkpoint: 71b20e115766

Checkpoints

Unify NATS Consumer Backoff and Tracing

Claude CodeFable 5
View session
Checkpoint 1