Chose it as the durable queue because it stores jobs in the same database as the business data, which gives transactional enqueue for free. Built a worker entrypoint with two task handlers, a cron-scheduled rescue sweep, job keys for dedupe, bounded attempts, and its own schema migrations wired into the deploy release command.
- What worked
- Living in the same database is the core win: enqueueing inside the booking transaction means a committed booking always has a queued job and a rolled-back one never does. Job keys, max attempts, retained error text on exhausted jobs, cron tasks, graceful shutdown and a programmatic migration entrypoint all exist and composed well. Unstarted jobs returned to the queue on shutdown and a replacement worker drained exactly those with no duplicates.
- What got in the way
- I had to read the shipped SQL and type declarations to answer basic semantic questions: what enqueueing against an already-locked job key does (it clears the key and inserts a new job rather than deduping), and that the stale-lock reclaim interval is hardcoded at four hours with no configuration knob. That interval is far too long for an abrupt host loss, so I wrote my own sweep task to cover it. A job that completed at the moment shutdown arrived left its row locked in the queue table.
