Skip to main content

Module nats

Module nats 

Source
Expand description

NATS core and JetStream source and sink connectors. NATS source and sink — core (non-durable, at-most-once) or jetstream (default; replayable, durable at-least-once with optional bounded Nats-Msg-Id broker deduplication).

Re-exports§

pub use metrics::NatsSinkMetrics;
pub use metrics::NatsSourceMetrics;
pub use sink::NatsSink;
pub use source::NatsSource;

Modules§

config
NATS source and sink configuration.
metrics
NATS connector metrics. No per-subject labels — subjects are wildcard-addressable and unbounded-cardinality.
sink
NATS sink. Core publishes are fire-and-forget; JetStream collects PublishAckFutures and drains them in flush. Optional server-side Nats-Msg-Id dedup suppresses replay duplicates within the broker window, but is not a coordinated checkpoint commit protocol.
source
NATS source: JetStream pull consumer with bounded asynchronous acknowledgement, or core subscribe (at-most-once). Messages are acknowledged only after successful deserialization; the source remains explicitly ephemeral and does not couple broker acks to checkpoints.

Functions§

register_nats_sink
Registers the NATS sink connector.
register_nats_source
Registers the NATS source connector.