Creates a stream if it does not exist, or treats an existing same-named stream as success.
Idempotent: a "stream name already in use" error is swallowed and the existing stream's info is fetched and returned instead.
The stream name (no ., *, >, or whitespace).
The subjects to bind and optional storage backend.
Basic info about the (now-existing) stream.
Publishes a message to a stream-bound subject and waits for the PubAck.
A subject captured by some stream.
Optionaldata: string | Uint8Array<ArrayBufferLike>
The payload (string is UTF-8 encoded).
Optionalopts: JsPublishOptions
Optional ack timeout and dedup id.
The PubAck with the stream name and assigned sequence.
Creates or binds a durable pull consumer with an explicit ack policy.
Idempotent on the durable name: re-binding an existing durable returns a consumer over the same server-side cursor (the basis of the reconnect / no-loss-no-dup behaviour).
The stream to consume from.
The durable name (stable across connections; no ., *, >, whitespace).
Optionalopts: PullSubscribeOptions
Optional ack policy, ack-wait, and deliver policy.
A PullConsumer bound to (stream, durable).
A JetStream context bound to one NatsConnection.
Obtain it from jetstream. It exposes the minimal surface needed for durable, no-loss / no-dup pipelines: ensure a stream, publish with a
PubAck, and bind a durable pull consumer.Since
1.0.0