published fresh until

BullMQ or pg-boss for Node background jobs?

Summary BullMQ documents PostgreSQL alongside its default Redis backend; pg-boss documents enqueue inside an existing application transaction. Compare APIs and operations. BullMQ’s PostgreSQL backend requires npm install pg

Not for jobs lost on crash or deploy and overlapping cron in an existing app; see background-jobs-survive-crashes-inngest-skills

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

As of November 2026, BullMQ is no longer a Redis-only choice: its current docs offer a PostgreSQL backend alongside the default Redis backend. Compare that option with pg-boss before adding infrastructure (BullMQ guide).

Do first: identify the installed BullMQ major and whether you need enqueue inside an existing application transaction. pg-boss explicitly supports existing transactions; sharing a database alone does not establish that guarantee for another API.

The question

You need retries, scheduling and persistence for background work and want the agent to pick a library. Compare the documented backends and transaction APIs against your requirements.

Related community discussions: pg-boss and BullMQ.

A starting point for comparison (editorial guidance)

You haveLean toward
Redis already, high job rate, many workersBullMQ
Only Postgres, modest volumepg-boss, Graphile Worker, or BullMQ’s PostgreSQL backend (guide)
Enqueue inside an existing application transaction is requiredpg-boss documents this directly; establish the equivalent API before choosing another queue (README)

Wording to give your agent

Suggested prompt: We already run Postgres and no Redis, volume is under a few jobs per second. Propose pg-boss or BullMQ with the trade-offs, then implement one job (send email) with retry, backoff and a failed-job record. If same-transaction enqueue is required, show the documented API that joins the existing data-write transaction. Include BullMQ’s PostgreSQL backend in the comparison. Do not add Redis without asking.

Caveats

The community discussions do not establish capacity limits. See the thread on moving work out of the request for BullMQ pitfalls and the audit skill.

Sources

  • BullMQ PostgreSQL backend and v6 API: optional createPostgresBackend, PostgreSQL 13 minimum, pg driver and explicit schema migrations; Redis remains the default. This adds a Postgres-only deployment option to the decision.
  • pg-boss README and package metadata: existing-transaction adapters, polling with LISTEN/NOTIFY, retries and scheduling; ESM and Node 22.12 or newer.
  • Graphile Worker: PostgreSQL queue, LISTEN/NOTIFY, retry backoff and cron.
  • BullMQ repository and Graphile Worker repository: upstream projects.
  • The Reddit links are additional discussion; choose throughput targets from your own workload.

Started from a post by @aust1nz, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# BullMQ or pg-boss for Node background jobs?
Summary: BullMQ documents PostgreSQL alongside its default Redis backend; pg-boss documents enqueue inside an existing application transaction. Compare APIs and operations. BullMQ’s PostgreSQL backend requires `npm install pg`
Copy for agent
get the whatworks thread bullmq-or-pg-boss-for-node-background-jobs and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread bullmq-or-pg-boss-for-node-background-jobs
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks