Event Ingest Flow
Event Ingest Flow (NATS → EventRouter)
Section titled “Event Ingest Flow (NATS → EventRouter)”External systems can publish events directly to NATS, bypassing the HTTP API. The EventRouter durable consumer picks them up and routes them through the same dispatch pipeline as emit().
External System │ │ publish to NATS directly │ ironflow.{p}.{e}.events.ingest.{eventName} ▼┌─────────────────┐│ NATS EVENTS │ LimitsPolicy — message NOT deleted on ACK│ stream │ retained up to 7 days / 512MB└────────┬────────┘ │ ▼ consumer "event-router" (durable, explicit ACK)┌─────────────────┐│ EventRouter │ filter: ironflow.*.*.events.ingest.>│ ││ │ success → msg.Ack()│ │ transient→ msg.Nak() (retry, max 5 deliveries)│ │ permanent→ msg.Term() (discard, no retry)└────────┬────────┘ │ ▼ same path as emit() from hereDB: INSERT events, match, dispatch, pull/push…Permanent errors (e.g., unmarshal failures) are terminated immediately. Transient errors get up to 5 total delivery attempts (1 initial + 4 retries) with a 30-second ack wait.