StreamConsumerOverrides
Defined in: src/interfaces/options.interface.ts:49
Overrides for JetStream stream and consumer configuration.
Properties
ackExtension?
optionalackExtension?:number|boolean
Defined in: src/interfaces/options.interface.ts:84
Auto-extend the NATS ack deadline via msg.working() during handler execution.
false(default): disabled — NATS redelivers afterack_waitif not acked.true: auto-extend atack_wait / 2interval (calculated from consumer config).number: explicit extension interval in milliseconds.
concurrency?
optionalconcurrency?:number
Defined in: src/interfaces/options.interface.ts:75
Maximum number of concurrent handler executions (RxJS mergeMap limit).
Default: undefined (unlimited — naturally bounded by max_ack_pending).
Set this to protect downstream systems from overload.
Important: if concurrency < max_ack_pending, messages buffer in RxJS
while their NATS ack timer ticks. Increase ack_wait proportionally to
prevent unnecessary redeliveries.
consume?
optionalconsume?:Partial<ConsumeOptions>
Defined in: src/interfaces/options.interface.ts:63
Options passed to the nats.js consumer.consume() call.
Controls prefetch buffer size, idle heartbeat interval, and auto-refill thresholds.
nats.js supports two consumption modes (message-based and byte-based).
Do not mix max_bytes/threshold_bytes with threshold_messages —
use one mode or the other.
See
https://github.com/nats-io/nats.js — ConsumeOptions
consumer?
optionalconsumer?:Partial<ConsumerConfig>
Defined in: src/interfaces/options.interface.ts:51
stream?
optionalstream?:Partial<StreamConfig>
Defined in: src/interfaces/options.interface.ts:50