Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. PostgreSQL
  3. pgBoss

pgBoss

MITTypeScript12.26.2

A job queue built in Node.js on top of PostgreSQL for reliable background processing and asynchronous execution.

Visit WebsiteGitHubGitHub
3.8k stars255 forks0 contributors

What is pgBoss?

pg-boss is a job queue library built in Node.js on top of PostgreSQL, designed to provide background processing and reliable asynchronous execution for Node.js applications. It leverages PostgreSQL's SKIP LOCKED feature to ensure exactly-once job delivery and atomic commits, minimizing the need for additional message broker infrastructure. It is ideal for teams already using PostgreSQL who want to simplify their architecture by avoiding extra systems.

Target Audience

Node.js developers and teams already using PostgreSQL who need a durable, atomic job queue for background processing without introducing a separate message broker. It is especially suited for those familiar with relational database semantics and operations like SQL, querying, and backups.

Value Proposition

Developers choose pg-boss because it integrates seamlessly with PostgreSQL, leveraging its robust features for reliability and exactly-once delivery, reducing infrastructure complexity. Its unique selling points include transactional job creation within existing database transactions, SQL support for non-Node.js runtimes, and multi-master compatibility for environments like Kubernetes ReplicaSets.

Overview

Queueing jobs in Postgres from Node.js like a boss

Use Cases

Best For

  • Implementing exactly-once job delivery in Node.js applications using PostgreSQL as the backend.
  • Creating background job processing systems where jobs must be created within existing database transactions for data consistency.
  • Scheduling recurring jobs with cron expressions in a PostgreSQL-based environment.
  • Managing queue storage policies for rate limiting, debouncing, and concurrency control in asynchronous workflows.
  • Building distributed workflows with pub/sub APIs for fan-out queue relationships.
  • Deploying job queues in multi-master setups, such as Kubernetes ReplicaSets, without additional message brokers.

Not Ideal For

  • Applications built on NoSQL databases like MongoDB, as pg-boss is tightly coupled to PostgreSQL and doesn't support alternative backends.
  • High-throughput systems processing millions of jobs per second, where dedicated message brokers like Kafka or RabbitMQ might offer better scalability and lower latency.
  • Serverless architectures with frequent cold starts, since pg-boss relies on persistent PostgreSQL connections that can conflict with ephemeral runtime environments.
  • Teams seeking a fully managed, cloud-native queue service without the overhead of database administration and maintenance.

Pros & Cons

Pros

Exactly-once Delivery

Leverages PostgreSQL's SKIP LOCKED feature to ensure jobs are processed reliably without duplicates, providing atomic commits as highlighted in the README for guaranteed execution.

Transactional Job Creation

Allows jobs to be created within existing database transactions, ensuring data consistency with application logic, a key feature for reliable background processing.

Cron Scheduling

Built-in support for cron expressions enables recurring job scheduling without external tools, simplifying periodic tasks in PostgreSQL-based environments.

Advanced Queue Management

Includes priority queues, dead letter queues, and automatic retries with exponential backoff, offering robust job handling for complex workflows.

SQL and Multi-master Support

Provides SQL access for non-Node.js runtimes and works in multi-master setups like Kubernetes, increasing flexibility for polyglot and distributed systems.

Cons

PostgreSQL Lock-in

The library is deeply integrated with PostgreSQL, making it unsuitable for teams using other databases or wanting a vendor-agnostic solution, as admitted in the README's focus on PostgreSQL users.

Potential Performance Bottlenecks

For extremely high-volume job processing, PostgreSQL might not scale as efficiently as dedicated message brokers, leading to latency issues under heavy loads.

Setup and Maintenance Overhead

Requires managing PostgreSQL database versions, separate packages for dashboard and proxy, and adherence to specific Node.js requirements, adding complexity to deployment.

Frequently Asked Questions

Quick Stats

Stars3,785
Forks255
Contributors0
Open Issues19
Last commit2 days ago
CreatedSince 2016

Tags

#cron-scheduling#postgres#message-queue#queue#asynchronous#background-processing#job#nodejs#node#postgresql#job-queue

Built With

P
PostgreSQL
N
Node.js
D
Docker

Links & Resources

Website

Included in

PostgreSQL11.8k
Auto-fetched 7 hours ago

Related Projects

riverriver

Fast and reliable background jobs in Go

Stars5,462
Forks166
Last commit8 hours ago
pgmqpgmq

A lightweight message queue. Like AWS SQS and RSMQ but on Postgres.

Stars5,032
Forks139
Last commit4 days ago
BeanQueueBeanQueue

BeanQueue, a lightweight Python task queue framework based on SQLAlchemy, PostgreSQL SKIP LOCKED queries and NOTIFY / LISTEN statements.

Stars28
Forks3
Last commit19 days ago
@andyrmitchell/pg-queue@andyrmitchell/pg-queue

The 'No Maintenance' Postgres Queue for Node.js

Stars0
Forks0
Last commit
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub