pg-boss is a job queue built in Node.js on top of PostgreSQL for background processing and reliable asynchronous execution.
The tool solves the problem of coordinating background work in Node.js applications by leveraging PostgreSQL as the queue backend. It uses Postgres's SKIP LOCKED feature, which was designed specifically for message queues, to handle record locking safely and provide exactly-once job delivery with atomic commit guarantees. This approach eliminates the need for a separate queueing system by storing jobs directly in the database.
The tool suits teams already invested in PostgreSQL who want to minimize their operational footprint by consolidating infrastructure. It works well for applications that benefit from relational database semantics and existing SQL tooling for monitoring and backups. The project offers integrations with popular Node.js ORMs including Drizzle, Knex, Kysely, and Prisma, allowing jobs to be created within existing database transactions. Beyond basic queueing, it supports job dependencies for workflow orchestration, cron and RRULE scheduling, priority queues, dead letter queues with redrive policies, automatic retries with exponential backoff, and pub/sub patterns. The tool also provides a web dashboard for monitoring, a command-line interface for schema management, and a HTTP proxy for connection pooling and platform compatibility. It runs on additional Postgres-based databases like CockroachDB and YugabyteDB, and can use embedded PGlite for in-process operation.
Development is maintained by a single person. The project includes a CLI for database migrations useful in CI/CD pipelines. A separate dashboard package provides job and queue monitoring through a web interface. A proxy package enables HTTP access for scenarios requiring connection pooling or multi-language support. The tool is compatible with serverless functions and multi-master deployments such as Kubernetes ReplicaSets.