Skip to content

NatsTransportOptions

Options for creating a NATS JetStream-backed pubsub transport.

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

Additional NATS connection options.


optional defaultSource?: string

Default CloudEvent source for publishers using this transport.


optional interceptors?: PubSubInterceptor[]

Optional interceptors for transport operations.


optional publishTimeoutMs?: number

Optional timeout for JetStream publish acknowledgements in milliseconds.


optional scheduler?: PubSubScheduler

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[]

NATS server URLs passed to the client.


optional signal?: AbortSignal

Optional signal that closes this transport when aborted.


stream: NatsEventStreamOptions

Event stream configuration for normal publishes and subscribes.