Creates a new NATS broker.
Runtime services for uuid, timestamps, and timers
Serializer for message payloads
Optionaloptions: NatsOptions
NATS connection and configuration options
Connects to NATS and ensures the JetStream stream exists.
Resolves when connected
When the stream is absent and
NatsOptions.streamSubjects was not supplied, or when the
platform refuses the stream read/create
Publishes a message to a subject (topic).
The message payload type
The subject to publish to
The message payload
Optionaloptions: PublishOptions
Optional publish headers, ordering key and de-duplication id
Resolves when published
Internal
Publishes with framework-owned headers under the configured acknowledgement bound.
Destination topic
Payload to serialize
Framework-owned transport headers
Optionaloptions: PublishOptions
Caller headers, ordering key and de-duplication id
Resolves when the transport acknowledges the publish
Tri-state backend reachability (M70c).
nats reconnects itself, so the broker runs the supervisor in observe
mode: Disconnect/Reconnect events mark the fault window, and the
probe is isClosed() === false and rtt() resolving. true when
both hold, false when the window is active or the connection reports
closed, undefined when the injected client exposes neither member (a
minimal fake) — the indicator then reports reachable: 'unknown'.
true/false/undefined as described
Sends a request and awaits a single correlated reply.
The request payload type
The reply payload type
Destination topic a responder is listening on
The request payload
Optionaloptions: RequestOptions
Reply timeout behavior
The reply payload
Internal
Sends request-reply traffic with framework-owned headers.
Optionaloptions: RequestOptionsRegisters a responder whose result is returned to the requesting caller.
The request payload type
The reply payload type
The request topic to respond on
Invoked per request; its result is returned to the caller
Optionaloptions: SubscribeOptions
Consumer group behavior
The active subscription
Subscribes through a durable JetStream group. Without an explicit queue,
replicas share <defaultQueue>.<topic>, starting at new messages when the
group is first created. Explicit queues retain the server's delivery policy.
Internal reply inboxes use ephemeral consumers and recover deleted handles.
The message payload type
The subject to subscribe to
The handler to invoke for each message
Optionaloptions: SubscribeOptions
Optional subscription options (queue for durable consumer name,
encoded through toJetStreamConsumerName)
The subscription handle
Internal
Subscribes through the header-aware internal path.
Optionaloptions: SubscribeOptions
NATS JetStream message broker implementation.
Since
0.1.0