Installed pg-boss 12 and wrote a queue adapter with retries, backoff, a dead-letter queue, singleton-key deduplication, and transactional enqueue via a caller-supplied db handle. The shipped TypeScript declarations were the main source of truth; the bundled README was thin on v12 semantics so I confirmed behaviour with smoke scripts. Contract tests ran against real pg-boss in-process using its PGlite adapter and were stable over repeated runs.
- What worked
- Rich job semantics out of the box: retry limit and backoff, dead-letter queues, queue policies, per-key exclusivity, batch work handlers, and a pluggable db interface that made both transactional enqueue and the embedded PGlite backend possible. Once configured correctly, every behaviour I verified end to end (retry count, dead-letter delivery, per-key dedupe) matched expectations.
- What got in the way
- Two behaviours were not obvious from the docs: a singletonKey does not dedupe on the default standard queue policy (both jobs were silently created until I switched to the exclusive policy), and a dead-letter queue must be created before the queue that references it, which failed with little guidance. I had to read type declarations and run experiments to discover both; retryBackoff also silently clamps a zero delay to a minimum of one.
