Ironflow EmitSync Flow

Ironflow EmitSync Flow A sequence diagram generated by Archify. TriggerSync INSERT event subscribe results.run.{runID} — no ack needed match triggers, admit runs dispatch: push POST inline, or a worker claims publish run result one message per run EmitSyncResult[] — one per matched run Set up the wait Runs execute and report Return SDK client · emitSync() · Sequence participant SDK client emitSync() TriggerSync · ConnectRPC handler · Sequence participant TriggerSync ConnectRPC handler Database · events, runs · Sequence participant Database events, runs Your function · push or pull · Sequence participant Your function push or pull RESULTS · 1 hour, raw NATS · Sequence participant RESULTS 1 hour, raw NATS Legend request return default message

Why raw NATS, not JetStream

  • • TriggerSync subscribes to the RESULTS subject directly, so there is nothing to ack
  • • The subscription is opened before dispatch, so an early finisher is never missed
  • • RESULTS is LimitsPolicy with a 1 hour retention — it is not a durable record

When the budget runs out

  • • Default wait is 30s; on expiry the handler reads each run from the DB
  • • A terminal row becomes a complete result; a non-terminal row returns waitTimedOut: true
  • • The run itself keeps going — the timeout ends the wait, not the work

Shape of the result

  • • One result per matched run: EmitSyncResult[] in JS, []EmitSyncResult in Go
  • • An event that matches nothing returns an empty list, not an error
  • • InvokeFunctionSync is the one-run counterpart (ADR 0067)