Skip to content

EmitSync Flow

TriggerSync fires an event and blocks until all matched runs complete or timeout. It subscribes directly to the NATS RESULTS stream using raw NATS (not JetStream consumers), so no ACK is needed.

SDK / HTTP Client
│ POST /ironflow.v1.IronflowService/TriggerSync
┌─────────────────────────────────────────────────────┐
│ TriggerSync Handler │
│ │
│ 1. INSERT event → DB │
│ 2. subscribe to NATS RESULTS stream ──────────────┐│
│ ironflow.{p}.{e}.results.run.{runID} ││
│ 3. match + dispatch (same as emit) ││
│ 4. WAIT (timeout 30s default) ────────────────────┘│
│ 5. receive result from RESULTS stream │
│ 6. return output to caller │
└─────────────────────────────────────────────────────┘
┌───────────────────────────────┐
│ Publisher: PushExecutor │ after HTTP fn completes
│ Engine │ after pull-mode run completes
│ Consumer: TriggerSync │ raw NATS subscribe, no ACK
│ Retention: 1 hour then gone │ ephemeral, not in DB
└───────────────────────────────┘

On timeout, the handler falls back to reading run status from the DB and returns the current state.