XRAPH/Work/Durable execution
Go · since 2026

Dispatch

Background jobs, durable workflows and leader-elected cron as a library you import rather than a service you operate. Workflow steps checkpoint, so a worker that dies mid-run resumes where it stopped instead of starting over. Exhausted retries land in a dead-letter queue you can inspect and replay.

Language
Go
Category
Durable execution
Since
2026
Stars
1
Repository Docs
01

Highlights

3 claims
H.01
WritteninGo
Durable workflows

A workflow is a multi-step Go function that checkpoints its progress and resumes after a failure. There is no separate DSL to learn or to debug.

H.02
Nothinglost
Retries and dead letters

Configurable backoff on every job, and anything that exhausts its retries lands in a queue you can inspect and replay.

H.03
Leader-elected
Cron and workers

Scheduling and work stealing survive a node going away, with heartbeats and registration handled by the library.

02

What it does

6 entries

Background work that survives the process that started it.

02.1
Jobs

Typed handlers with priority

Handlers are declared with their payload type, enqueued with a priority and retried on a backoff you configure. The type is checked where the job is written, which is where the mistake gets made.

Typed
02.2
Workflows

Checkpointed Go functions

A multi-step function that records progress and resumes where it stopped. Because it is ordinary Go, the debugger and the tests you already have still apply.

Resumable
02.3
Failure

A dead letter queue

Jobs that exhaust their retries are captured with their last error, and can be inspected, corrected and replayed on demand.

Replayable
02.4
Cron

Leader-elected scheduling

Per-tenant schedules that can be enabled and disabled at runtime, with one elected leader so a schedule does not fire once per node.

Per-tenant
02.5
Workers

Registration and work stealing

Workers register, heartbeat and steal work from each other, so adding a node adds throughput without a rebalance step.

Distributed
02.6
Storage

In-memory to Postgres

Development runs in memory and production on Postgres, behind an interface small enough to implement against something else.

Pluggable
03

Anatomy

4 modules
01

Jobs

Durable units with retries and dead lettering.

02

Workflows

Multi-step execution that survives a restart.

03

Cron

Scheduled work coordinated across the cluster.

04

Coordination

Leader election so a schedule fires once, not once per node.

04

Why it exists

Design notes

#What it is

Dispatch is durable execution as a library. Background jobs, multi-step workflows, distributed cron and worker coordination, imported into your process rather than run as a separate service.

#What it gives you

  • Jobs: typed handlers, priority enqueue, configurable retry with backoff.
  • Workflows: multi-step functions with checkpointing, parallel steps and event waiting. A worker that dies mid-run resumes at the last checkpoint instead of restarting.
  • Cron: leader-elected so exactly one worker fires a schedule, with per-tenant entries.
  • Dead letter queue: automatic promotion once retries are exhausted, then inspect, replay or purge.
  • Cluster coordination: worker registration, heartbeats, leader election and work stealing.
  • Middleware: a composable chain for logging, tracing, metrics, panic recovery and scope injection.
  • Observability: OpenTelemetry metrics and traces built in, and Relay integration that emits a typed webhook at every lifecycle point.

Storage is pluggable: memory, PostgreSQL via pgx, Grove, SQLite or Redis.

#The scaling caveat

Workers scale with the process they live in, which is the honest cost of the library model. Running the same binary in a worker-only mode gets most of the way there, and it is a workaround rather than a solution. If you need workers to scale entirely independently of your API tier, a separate service is the right answer and Dispatch is a reasonable way to build one.

05

Signals

GitHub
Stars
1
Language
Go
Since
2026
Adopters
00

Shipping something on Dispatch? Nobody is listed here yet. Tell me what you built and you will be the first.

Get listed
06

Where it sits

Fields · papers