interface NatsOptions
Since 0.1.0

NATS-specific options (internal use).

Properties

optional
url: string

NATS connection URL(s).

optional
client: INatsConnection

Injected NATS connection.

Factory for NATS headers when an application injects the connection.

optional
streamName: string

JetStream stream name (default: 'MESSAGING').

Since 0.5.0
optional
streamSubjects: readonly string[]

Subjects the broker may create the stream with when it is absent (X28-2). No default: with the stream absent and this unset, connect() throws JetStreamStreamError naming both remedies. See NatsMessagingOptions.streamSubjects for the full behavior.

optional
defaultQueue: string

Default consumer group name.

optional
logger: { error: (msg: string) => void; }

Optional logger for error reporting.

Usage

import { type NatsOptions } from "messaging-plugin/src/index.ts";