JetstreamConnectionOptions
@horizon-republic/nestjs-jetstream
@horizon-republic/nestjs-jetstream / JetstreamConnectionOptions
JetstreamConnectionOptions
Defined in: src/interfaces/connection.interface.ts:20
Configuration for one named connection.
Every field except servers falls back to the root-level value of the same
name; setting it here wins for this connection only.
Properties
broadcast?
optionalbroadcast?:StreamConsumerOverrides
Defined in: src/interfaces/connection.interface.ts:55
Broadcast event stream/consumer overrides for this connection.
codec?
optionalcodec?:Codec
Defined in: src/interfaces/connection.interface.ts:39
Codec for this connection; falls back to the root codec.
connectionOptions?
optionalconnectionOptions?:Partial<ConnectionOptions>
Defined in: src/interfaces/connection.interface.ts:36
Raw NATS connection options for this connection.
critical?
optionalcritical?:boolean
Defined in: src/interfaces/connection.interface.ts:33
Whether application startup depends on this connection.
true (default) blocks boot until the connection is live. false connects
lazily in the background, retries on failure, and reports degraded health
instead of failing readiness.
Default
true
dlq?
optionaldlq?:boolean|DlqOptions
Defined in: src/interfaces/connection.interface.ts:67
Dead-letter queue configuration for this connection.
events?
optionalevents?:StreamConsumerOverrides
Defined in: src/interfaces/connection.interface.ts:52
Workqueue event stream/consumer overrides for this connection.
metadata?
optionalmetadata?:MetadataRegistryOptions
Defined in: src/interfaces/connection.interface.ts:70
Handler metadata KV registry configuration for this connection.
ordered?
optionalordered?:OrderedEventOverrides
Defined in: src/interfaces/connection.interface.ts:61
Ordered event consumer configuration for this connection.
provisioning?
optionalprovisioning?:ProvisioningOptions
Defined in: src/interfaces/connection.interface.ts:73
Provisioning behavior for this connection.
publisherOnly?
optionalpublisherOnly?:boolean
Defined in: src/interfaces/connection.interface.ts:49
Skip consumer infrastructure on this connection.
Unlike the root option this can go either way, so one connection may publish only while another consumes, or the reverse.
Default
inherited from the root option, which defaults to false
rpc?
optionalrpc?:RpcConfig
Defined in: src/interfaces/connection.interface.ts:64
RPC transport mode and configuration for this connection.
schedule?
optionalschedule?:StreamConsumerOverrides
Defined in: src/interfaces/connection.interface.ts:58
Schedule stream/consumer overrides for this connection.
servers
servers:
string[]
Defined in: src/interfaces/connection.interface.ts:22
NATS server URLs for this connection.
shutdownTimeout?
optionalshutdownTimeout?:number
Defined in: src/interfaces/connection.interface.ts:76
Graceful shutdown budget in ms for this connection.