Skip to main content

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?​

optional broadcast?: StreamConsumerOverrides

Defined in: src/interfaces/connection.interface.ts:55

Broadcast event stream/consumer overrides for this connection.


codec?​

optional codec?: Codec

Defined in: src/interfaces/connection.interface.ts:39

Codec for this connection; falls back to the root codec.


connectionOptions?​

optional connectionOptions?: Partial<ConnectionOptions>

Defined in: src/interfaces/connection.interface.ts:36

Raw NATS connection options for this connection.


critical?​

optional critical?: 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?​

optional dlq?: boolean | DlqOptions

Defined in: src/interfaces/connection.interface.ts:67

Dead-letter queue configuration for this connection.


events?​

optional events?: StreamConsumerOverrides

Defined in: src/interfaces/connection.interface.ts:52

Workqueue event stream/consumer overrides for this connection.


metadata?​

optional metadata?: MetadataRegistryOptions

Defined in: src/interfaces/connection.interface.ts:70

Handler metadata KV registry configuration for this connection.


ordered?​

optional ordered?: OrderedEventOverrides

Defined in: src/interfaces/connection.interface.ts:61

Ordered event consumer configuration for this connection.


provisioning?​

optional provisioning?: ProvisioningOptions

Defined in: src/interfaces/connection.interface.ts:73

Provisioning behavior for this connection.


publisherOnly?​

optional publisherOnly?: 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?​

optional rpc?: RpcConfig

Defined in: src/interfaces/connection.interface.ts:64

RPC transport mode and configuration for this connection.


schedule?​

optional schedule?: 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?​

optional shutdownTimeout?: number

Defined in: src/interfaces/connection.interface.ts:76

Graceful shutdown budget in ms for this connection.