Emit Flow
Emit Flow (Async Trigger)
Section titled “Emit Flow (Async Trigger)”Two ConnectRPC endpoints expose emit semantics:
PubSubService/Emit— fires event + publishes to pubsub bridge for subscribersIronflowService/Emit(alias forTrigger) — fires event without pubsub bridge
Both share the same core logic via EventTriggerHelper.Emit().
SDK / HTTP Client │ │ POST /ironflow.v1.PubSubService/Emit │ or /ironflow.v1.IronflowService/Trigger ▼┌─────────────────┐│ HTTP Handler │└────────┬────────┘ │ ▼┌─────────────────┐│ DB: events │ INSERT (processed=false, idempotency_key)│ table │└────────┬────────┘ │ ├──────────────────────────────────────────────────────┐ │ match functions (local, no NATS) │ │ INSERT runs (status=pending) │ │ │ │ ┌─────────────────────────────────────────┐ │ │ │ PUSH mode │ │ │ │ HTTP call → function endpoint │ │ │ │ → UPDATE runs/steps in DB │ │ │ └─────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────┐ │ │ │ PULL mode │ │ │ │ publish to NATS STEPS stream │ │ │ │ ironflow.{p}.{e}.steps.dispatch.pull. │ │ │ │ {functionID} │ │ │ └────────────────────┬────────────────────┘ │ │ │ │ │ ▼ │ │ ┌─────────────────┐ │ │ │ Worker (gRPC) │ │ │ │ consumes step │ │ │ │ executes fn │ │ │ │ ACK → deleted │ ← WorkQueue │ │ └────────┬────────┘ (removed on ACK) │ │ │ │ │ ▼ │ │ UPDATE runs/steps in DB │ │ publish to NATS RESULTS stream │ │ │ ▼ │MarkEventProcessed() processed=true ◄────────────────────────┘(event stays in DB forever)