A background job system built on PostgresSQL - no BullMQ, no SQS, no Redis. Jobs are durable (survive crashes), contention-free (multiple workers, no double-processing), and enqueued atomically with business data.
Three moving parts:
- The API server - accepts business operations and enqueues jobs inside the same DB transaction (the outbox pattern). Exposes as admin HTTP API.
- The Worker Engine - polls the jobs table, claims jobs with SELECT FOR UPDATE SKIP LOCKED, runs handlers, manages retries and failures.
- The PostgresSQL Database - the single source of truth. No external queue broker. The DB is the queue.
So you know where we're headed:
Session 1 -> DB schema + migrations + pg client setup