# BullMQ — card for AI agents

Fast, reliable Redis-backed queue for jobs and messages in Node.js.

Category: Jobs, queues and workflows · npm package `bullmq` · latest version 6.5.3 (checked 2026-11-01)
Install: `npm install bullmq`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (paste into AGENTS.md or CLAUDE.md)

## BullMQ
- Give the producer and the worker the same queue name (case matters). On Redis, also match the `prefix` (default `bull`), host, port and database number. On PostgreSQL, match the database and schema (default `bullmq`).
- Make every processor code path return or throw, and add timeouts to network calls. A processor that never settles keeps the job active forever.
- Move CPU-heavy processors to sandboxed processors, or split them with flows, so the worker can keep renewing its lock.
- On shutdown, handle `SIGTERM` with `await worker.close()` so current jobs finish before exit.
- On PostgreSQL, run `runMigrations` as a deploy step or pass `migrate: true` on the connection. Otherwise workers fail with `SchemaMigrationRequiredError`.
- Only read BullMQ's PostgreSQL tables. Change jobs through BullMQ or a dashboard, never with direct SQL writes.
- When using the node-redis adapter (`createNodeRedisClient`), install `redis` 5.0.0 or newer.

## Docs written for agents
- [llms.txt (index of the docs)](https://bullmq.io/llms.txt)

## What it is
- The repo describes BullMQ as "Message Queue and Batch processing for NodeJS, Python, .NET, Elixir, Rust and PHP based on Redis or PostgreSQL". The Node.js and Bun package is `bullmq` on npm, under the MIT license. The site's llms.txt index calls it the successor to the Bull library.
- The README shows three pieces. A `Queue` adds named jobs with data. A `Worker` processes them. `QueueEvents` reports completion and failure. The llms.txt index lists delayed and prioritized jobs, retries with backoff, rate limiting, global concurrency, deduplication, job schedulers, parent and child flows, and OpenTelemetry support. BullMQ started on Redis and Redis-compatible servers. Since v6 it also runs on PostgreSQL 13 or newer.
- The libraries for each language share queues. A producer in one service and a worker in another do not have to be written in the same language. The runtimes page says Node.js has the most features. Its advice is to otherwise use the library for the language your service is already written in.

## Caveats
- Feature support differs by language: The runtimes page says only the core queue behavior is shared. Higher-level features are added to each library separately. The PHP client currently has no worker support: its table marks processing jobs, rate limiting, flows and job events as not available for PHP.
- CPU-heavy work causes false stalls: A worker renews its job lock from the Node.js event loop. Long synchronous work blocks that loop, so the lock can expire and the job is marked stalled while it is still running. The guide suggests sandboxed processors, splitting the job with flows, or a larger `lockDuration`.
- Queue identity is easy to get wrong: The debugging guide calls a worker that listens to a different queue "the most common cause" of jobs stuck in waiting. The queue name must match including case. On Redis the prefix, host, port and database number must also match.
- Some managed Redis hides your workers: On Redis, the worker list depends on `CLIENT SETNAME`. On services that don't support it, dashboards and `getWorkersCount()` show an empty list even while workers are running.
- Groups and batches are Pro-only: The README's comparison table puts a check for observables, group rate limit, group support and batches support only in the BullMQ-Pro column. The plain BullMQ column is empty for those rows.

## Numbers (AgentGid data)
- Gid Score: 67.3 (#529 of all tools, 2 of 48 in its category)
- Used in 35 public projects set up for AI coding agents (0.6%)
- Downloads last week: 13,855,940 (as of 2026-11-24), +44.5% over 4 weeks
- GitHub stars: 9,628 (as of 2026-11-24)
- Last push: 2026-11-24

## Often used with
ioredis 88.6%, dotenv 74.3%, tsx 57.1%, Vitest 65.7%, Zod 71.4%, TypeScript 97.1%

## Checked alternatives (same job)
- Bull: https://agentgid.com/tools/bull/agent.md
- pg-boss: https://agentgid.com/tools/pg-boss/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/bullmq/
- Homepage: https://bullmq.io/
- Repository: https://github.com/taskforcesh/bullmq
- Source: https://github.com/taskforcesh/bullmq#readme
- Source: https://github.com/taskforcesh/bullmq
- Source: https://github.com/taskforcesh/bullmq/releases
- Source: https://bullmq.io
- Source: https://bullmq.io/llms.txt
- Source: https://bullmq.io/runtimes/
- Source: https://bullmq.io/articles/guides/debugging-stuck-bullmq-jobs/

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
