Skip to content

NatsTransportOptions

Defined in: types.ts:37

Options for creating a NATS JetStream-backed pubsub transport.

optional connectionOptions?: Omit<ConnectionOptions, "servers">

Defined in: types.ts:41

Additional NATS connection options.


optional defaultSource?: string

Defined in: types.ts:55

Default CloudEvent source for publishers using this transport.


optional interceptors?: PubSubInterceptor[]

Defined in: types.ts:57

Optional interceptors for transport operations.


optional publishTimeoutMs?: number

Defined in: types.ts:53

Optional timeout for JetStream publish acknowledgements in milliseconds.


optional scheduler?: PubSubScheduler

Defined in: types.ts:51

Optional scheduler used for durable notBefore publish and delayed retry.

Immediate publish/subscribe does not require a scheduler. If a publish call provides notBefore, or a handler returns ctx.retry({ delay }), the transport throws unless a scheduler was supplied.


optional servers?: string | string[]

Defined in: types.ts:39

NATS server URLs passed to the client.


optional signal?: AbortSignal

Defined in: types.ts:59

Optional signal that closes this transport when aborted.


stream: NatsEventStreamOptions

Defined in: types.ts:43

Event stream configuration for normal publishes and subscribes.