Operations
Runtime Operations
Running pipelines, state directories, graceful shutdown, and local-only constraints.
Mailer runs inside one Go process. There is no job server or distributed cluster runtime yet.
Local execution
Today, workflow source files are local files:
go run ./cmd/mailer-workflow --file examples/workflows/order-totals.yamlThe CLI reads the workflow from disk, compiles it in-process, and executes it in the same process.
Data directories
Use --data-dir or workflow env fields to control state and checkpoint
locations.
go run ./cmd/mailer-workflow \
--file workflow.yaml \
--data-dir ./dataTwo workflows with different names derive isolated state directories under the same base directory.
Graceful shutdown
On context cancellation:
- The source stops producing.
- In-flight records drain through the stages.
- Checkpointing can save a final barrier.
- The sink drains.
- If drain exceeds the shutdown timeout, stages are force-aborted.
Production guidance
- Use stable workflow names for stateful jobs.
- Store checkpoint and Pebble directories on persistent local disks.
- Use
txnKafkaonly with stable transactional ids. - Monitor edge queue sizes to find bottlenecks.
- Use
--dry-run --describebefore running service-backed workflow changes.