Workers
Consumers are stateless pullers. A worker that stops heartbeating is reaped after 60s and its leases are returned to the queue by the coordinator alarm.
Fleet
No worker has polled yet. Run
npm run worker (see README) to start the bundled example consumer.Lease model
Lease = visibility timeout
A leased job is invisible to other workers until lease_expires_at. Renew it with POST /api/jobs/:id/heartbeat.At-least-once
Execution is at-least-once. Handlers must be idempotent; leaseId guards against a zombie worker acking after its lease was stolen.Retry is server-side
The coordinator owns backoff and attempt budgets. Workers only report success, retryable failure, or fatal failure.Concurrency is derived
slots = concurrency - inflight, computed from live leases — nothing to reconcile after a crash.