Mailer
Workflows

Workflow Format

The YAML and JSON structure accepted by the workflow compiler.

Top-level fields

name: my-pipeline
version: "1"
env: {}
source: {}
pipeline: []
sink: {}
FieldRequiredNotes
nameOptionalUsed in logs, metrics, and derived state directories.
versionOptionalCurrently "1".
envOptionalRuntime configuration.
sourceRequiredOne source.
pipelineOptionalOrdered operator list.
sinkRequiredOne sink.

Parsing is strict. Unknown keys are rejected, which catches typos before a workflow can run.

Durations

Durations use Go duration strings:

shutdownTimeout: 30s
checkpointing:
  interval: 5m

Valid examples include 500ms, 30s, 5m, and 1h30m.

Environment

env:
  bufferSize: 1024
  shutdownTimeout: 30s
  checkpointing:
    interval: 30s
    dir: ./data/checkpoints
  state:
    backend: pebble
    dir: ./data/state
FieldDefaultSDK equivalent
bufferSize1024WithBufferSize
shutdownTimeout30sWithShutdownTimeout
checkpointing.intervalOffWithCheckpointing
checkpointing.dirOptional — derived as <data-dir>/<workflow-name>/checkpoints when omittedcheckpoint.NewFileStorage
state.backendmemoryWithStateBackend
state.dirOptional — derived as <data-dir>/<workflow-name>/state when omittedPebble root directory

Source

source:
  type: kafka
  kafka:
    brokers: [localhost:9092]
    topic: orders
    groupID: orders
    startFrom: earliest
    exactlyOnce: true
    deserialize: json
    watermark:
      maxOutOfOrderness: 1s
      interval: 500ms

Source type can be generator, slice, or kafka.

Sink

sink:
  type: stdout

Sink type can be stdout, blackhole, kafka, txnKafka, or postgres.

On this page