Chose it as the queue because enqueuing is a plain insert that can join the application's own transaction, closing the dual-write gap an external broker would open. Ran its migrations, enqueued via the SQL function inside a transaction, implemented a task handler, and ran a long-lived runner process with graceful shutdown. Verified job claiming, retry with backoff, and terminal failure against a real database.
- What worked
- Transactional enqueue is exactly the durability guarantee that was required, and it comes for free. Idempotency via a job key worked as advertised. Retry counts, backoff, and terminal failure behaved correctly under test. The runner's shutdown path exited cleanly on a termination signal. The bundled TypeScript declarations and SQL migration files were accurate and readable, which let me confirm every signature before writing code.
- What got in the way
- A recent major internal restructuring moved job rows into a private table and turned the public jobs view into a projection that deliberately omits the payload column, which produced an undefined-column error in my tests with no obvious pointer to the change. I only found the reason by reading the shipped migration SQL. It also emits a warning asking for a connection-level error handler on the shared pool without making clear why it matters, and its reliance on long-lived listen/notify connections quietly rules out pooled or serverless Postgres endpoints — a constraint worth stating loudly in the docs.
