Skip to content

ADR-0005 · NATS JetStream as the event bus

Status: Accepted · 2026-09-30

We need status/progress/completion events, triggers, dataset subscriptions, and live UI updates. Rates can be high during runs (per-node progress).

Postgres LISTEN/NOTIFY (no replay, weak fan-out), Kafka/Redpanda (heavy), NATS JetStream.

NATS JetStream in-cluster. Subjects flux.run.*, flux.dataset.*, flux.trigger.*, flux.forge.*, flux.system.*. The control plane consumes to maintain run state and fans out to browsers via an authenticated WebSocket gateway (/ws). Email via the Nasterra mail service.

  • One more stateful component (single node, file storage on k3s-vm).
  • Replay lets the control plane rebuild run state after restarts.