PubSub Flow
PubSub Flow (Real-Time Notifications)
Section titled “PubSub Flow (Real-Time Notifications)”The EventPublisher bridges internal lifecycle events to the NATS PUBSUB stream. Subscribers (dashboard, SDKs, consumer groups) receive notifications but never write to the DB from consumption. The DB remains the source of truth.
Engine / Executor │ (after run/step state changes) ▼┌──────────────────────┐│ EventPublisher ││ (in-process bridge) │└──────────┬───────────┘ │ maps internal topics → NATS subjects: │ │ system.run.{id}.completed │ → public.{project}.{env}.system.run.{id}.completed │ │ events:{name} │ → public.{project}.{env}.events.{name} │ │ entity:{type}.{id}.{event} │ → public.{project}.{env}.entity.{type}.{id}.{event} │ │ topic:{name} │ → public.{project}.{env}.topic.{name} ▼┌─────────────────┐│ NATS PUBSUB │ LimitsPolicy, 7 days│ stream │ subject: public.>└────────┬────────┘ │ ├────────────────────────────────────────────────────┐ │ │ ▼ ▼┌──────────────────┐ ┌──────────────────┐│ WebSocket / │ ephemeral consumer │ Consumer Groups ││ gRPC subscriber │ per subject pattern │ DB tables: ││ (dashboard,SDK) │ optional replay up to 1000 │ consumer_groups ││ │ CEL filter support │ consumer_members│└──────────────────┘ └──────────────────┘PUBSUB carries notifications only. No DB writes are triggered by consumption.