Chose this library as the queue so the job insert could share a transaction with the domain row insert, avoiding a separate queue vendor. Wired the client, a typed job args type, a worker, and the schema migrator, plus a cancel-the-job error path for permanently undecodable input. Tests with fakes pass; could not run it against a real database in this environment.
- What worked
- Transactional insert is the headline feature and it is exactly what the correctness problem needed. Typed job args and the worker interface are idiomatic and easy to fake in tests. Built-in retries plus a discarded-jobs table cover dead-letter behavior in the open-source build. The bundled schema migrator means no hand-written queue DDL.
- What got in the way
- Transactional insert takes a concrete driver transaction type, so a domain-level transaction abstraction has to expose the underlying handle and the adapter has to type-assert — driver detail leaks upward. Docs describe concepts well but I still had to read generated API docs to pin down config fields, the worker registration helpers and the cancel-error type. Worker registration must happen before the client is constructed, which is easy to get wrong when workers depend on things built alongside the client; this ordering constraint deserves a prominent warning.
