pg-boss
Job queue for Node.js that uses PostgreSQL as the backing store. pg-boss leverages PostgreSQL's SKIP LOCKED for efficient job dequeuing and uses the same database as your application — no separate Redis infrastructure required. Supports job scheduling, delayed jobs, recurring jobs (cron), job completion callbacks, retry with exponential backoff, and concurrency control. Ideal for applications already using PostgreSQL.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
PostgreSQL TLS support. Job data stored in database — apply column-level encryption for sensitive job payloads. Database credentials in connection string.
⚡ Reliability
Best When
You're using PostgreSQL and want reliable background job processing without Redis — pg-boss turns your existing DB into a job queue with proper transactional semantics.
Avoid When
You need extreme job throughput, multi-database support, or sub-second job processing latency — BullMQ with Redis is faster.
Use Cases
- • Implement background job queues in agent backends that already use PostgreSQL without adding Redis infrastructure
- • Schedule one-time and recurring agent tasks using the same PostgreSQL database as application data
- • Process agent work items with reliable delivery guarantees — pg-boss uses SKIP LOCKED for exactly-once processing across workers
- • Implement delayed job execution for agent workflows that need to fire actions after a time delay
- • Build fan-out patterns where agent jobs spawn multiple child jobs tracked in the same database
Not For
- • High-volume job processing (millions of jobs/second) — BullMQ with Redis is faster for extreme throughput
- • Non-PostgreSQL databases — pg-boss is PostgreSQL only
- • Real-time job processing with sub-second latency — pg-boss polling has configurable but minimum latency overhead
Interface
Authentication
PostgreSQL connection string auth — same as your existing database connection. pg-boss creates its own schema in the specified database.
Pricing
MIT-licensed open source library. Uses your existing PostgreSQL costs.
Agent Metadata
Known Gotchas
- ⚠ pg-boss creates tables in the 'pgboss' schema — ensure the database role has CREATE SCHEMA permissions; first start fails without schema creation rights
- ⚠ Job workers must call work() which starts polling — jobs sent before calling work() are queued in the database but not processed until workers start
- ⚠ Maintenance (archiving old jobs) runs on a schedule — configure maintenanceIntervalSeconds; databases with many jobs may have maintenance overhead
- ⚠ pg-boss v9 changed job batching API — batch sends use sendBatch() instead of multiple send() calls; older code patterns may not batch efficiently
- ⚠ Connection pooling — pg-boss uses its own internal pool; don't share your application's pg Pool with pg-boss to avoid connection exhaustion
- ⚠ Cron scheduling uses pg-boss's internal format, not standard 5-field cron — verify expression format in documentation for the version you're using
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for pg-boss.
Scores are editorial opinions as of 2026-03-06.