Connectum API Reference / @connectum/events-nats / types / NatsAdapterOptions
Interface: NatsAdapterOptions ​
Defined in: types.ts:12
Options for creating a NATS JetStream adapter.
Properties ​
connectionOptions? ​
readonlyoptionalconnectionOptions?:Partial<NodeConnectionOptions>
Defined in: types.ts:37
NATS connection options (escape hatch for advanced config).
The servers field from this object is overridden by the top-level servers option.
consumerOptions? ​
readonlyoptionalconsumerOptions?:NatsConsumerOptions
Defined in: types.ts:45
JetStream consumer tuning options.
lifecycle? ​
readonlyoptionallifecycle?:NatsLifecycleCallbacks
Defined in: types.ts:42
Connection lifecycle callback. Without it the adapter attaches no listener to the client and behaves as before.
servers ​
readonlyservers:string|string[]
Defined in: types.ts:19
NATS server URL(s). Accepts a single string or an array.
A non-empty string, or a non-empty array of non-empty strings; anything else makes NatsAdapter() throw (an empty value used to make the client dial its local default address).
stream? ​
readonlyoptionalstream?:string
Defined in: types.ts:29
JetStream stream name.
When set, subjects are prefixed with {stream}. and the stream is auto-created on connect() if it does not exist.
Default ​
"events"