BullMQ — Redis-Based Job Queue for Node.js
You are an expert in BullMQ, the high-performance job queue for Node.js built on Redis. You help developers build reliable background processing systems with delayed jobs, rate limiting, prioritization, repeatable cron jobs, job dependencies, concurrency control, and dead-letter handling — powering email sending, image processing, webhook delivery, report generation, and any async workload.
Best use case
BullMQ — Redis-Based Job Queue for Node.js is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
You are an expert in BullMQ, the high-performance job queue for Node.js built on Redis. You help developers build reliable background processing systems with delayed jobs, rate limiting, prioritization, repeatable cron jobs, job dependencies, concurrency control, and dead-letter handling — powering email sending, image processing, webhook delivery, report generation, and any async workload.
Teams using BullMQ — Redis-Based Job Queue for Node.js should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/bull-mq/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How BullMQ — Redis-Based Job Queue for Node.js Compares
| Feature / Agent | BullMQ — Redis-Based Job Queue for Node.js | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
You are an expert in BullMQ, the high-performance job queue for Node.js built on Redis. You help developers build reliable background processing systems with delayed jobs, rate limiting, prioritization, repeatable cron jobs, job dependencies, concurrency control, and dead-letter handling — powering email sending, image processing, webhook delivery, report generation, and any async workload.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# BullMQ — Redis-Based Job Queue for Node.js
You are an expert in BullMQ, the high-performance job queue for Node.js built on Redis. You help developers build reliable background processing systems with delayed jobs, rate limiting, prioritization, repeatable cron jobs, job dependencies, concurrency control, and dead-letter handling — powering email sending, image processing, webhook delivery, report generation, and any async workload.
## Core Capabilities
### Queue and Worker
```typescript
import { Queue, Worker, QueueScheduler, FlowProducer } from "bullmq";
import IORedis from "ioredis";
const connection = new IORedis({ host: "localhost", port: 6379, maxRetriesPerRequest: null });
// Define queue
const emailQueue = new Queue("email", { connection });
// Add jobs
await emailQueue.add("welcome", {
to: "user@example.com",
template: "welcome",
data: { name: "Alice" },
}, {
priority: 1, // Lower = higher priority
attempts: 3, // Retry up to 3 times
backoff: { type: "exponential", delay: 2000 },
removeOnComplete: { count: 1000 }, // Keep last 1000 completed
removeOnFail: { age: 7 * 24 * 3600 }, // Keep failed for 7 days
});
// Delayed job
await emailQueue.add("reminder", { userId: 42 }, {
delay: 24 * 60 * 60 * 1000, // 24 hours from now
});
// Repeatable (cron)
await emailQueue.add("digest", {}, {
repeat: { pattern: "0 9 * * 1" }, // Every Monday at 9 AM
});
// Worker
const worker = new Worker("email", async (job) => {
switch (job.name) {
case "welcome":
await sendEmail(job.data.to, job.data.template, job.data.data);
break;
case "reminder":
await sendReminderEmail(job.data.userId);
break;
case "digest":
await sendWeeklyDigest();
break;
}
// Progress reporting
await job.updateProgress(100);
return { sent: true, timestamp: Date.now() };
}, {
connection,
concurrency: 5, // Process 5 jobs simultaneously
limiter: { max: 100, duration: 60000 }, // Rate limit: 100 jobs/min
});
worker.on("completed", (job, result) => console.log(`Job ${job.id} completed`));
worker.on("failed", (job, err) => console.error(`Job ${job?.id} failed: ${err.message}`));
```
### Job Flows (Parent-Child Dependencies)
```typescript
const flow = new FlowProducer({ connection });
await flow.add({
name: "generate-report",
queueName: "reports",
data: { reportId: "monthly-2026-03" },
children: [
{ name: "fetch-sales", queueName: "data", data: { source: "sales" } },
{ name: "fetch-users", queueName: "data", data: { source: "users" } },
{ name: "fetch-metrics", queueName: "data", data: { source: "metrics" } },
],
// Parent job runs only after ALL children complete
});
```
## Installation
```bash
npm install bullmq ioredis
```
## Best Practices
1. **Separate workers** — Run workers in separate processes/containers from your API; scale independently
2. **Idempotent jobs** — Design jobs to be safely retried; use unique job IDs to prevent duplicates
3. **Backoff strategy** — Use exponential backoff for retries; prevents thundering herd on downstream failures
4. **Rate limiting** — Use `limiter` to respect API rate limits (email providers, webhooks, external APIs)
5. **Progress tracking** — Use `job.updateProgress()` for long-running jobs; clients can poll progress
6. **Graceful shutdown** — Call `worker.close()` on SIGTERM; finishes current jobs before exiting
7. **Flows for pipelines** — Use FlowProducer for job dependencies; parent waits for all children to complete
8. **Monitor with Bull Board** — Use `@bull-board/express` for a web UI showing queue status, job data, and failuresRelated Skills
sqs-queue-setup
Sqs Queue Setup - Auto-activating skill for AWS Skills. Triggers on: sqs queue setup, sqs queue setup Part of the AWS Skills skill category.
redis-cache-manager
Redis Cache Manager - Auto-activating skill for Backend Development. Triggers on: redis cache manager, redis cache manager Part of the Backend Development skill category.
rabbitmq-queue-setup
Rabbitmq Queue Setup - Auto-activating skill for Backend Development. Triggers on: rabbitmq queue setup, rabbitmq queue setup Part of the Backend Development skill category.
property-based-test-helper
Property Based Test Helper - Auto-activating skill for Test Automation. Triggers on: property based test helper, property based test helper Part of the Test Automation skill category.
cloud-tasks-queue-setup
Cloud Tasks Queue Setup - Auto-activating skill for GCP Skills. Triggers on: cloud tasks queue setup, cloud tasks queue setup Part of the GCP Skills skill category.
upstash-redis-kv
Read and write to Upstash Redis-compatible key-value store via REST API. Use when there is a need to save or retrieve key-value data, use Redis features (caching, counters, lists, sets, hashes, sorted sets, etc.) for the current interaction, or when the user explicitly asks to use Upstash or Redis.
building-n8n-nodes
Builds custom community nodes for n8n, the workflow automation platform. Activates when the user wants to create, scaffold, develop, test, lint, or publish an n8n node — including both declarative (REST API) and programmatic styles. Also triggers when the user mentions n8n nodes, n8n-cli, n8n-node, community nodes, node credentials, or anything related to extending n8n with custom integrations. Encodes all official best practices from n8n's documentation.
react-flow-node-ts
Create React Flow node components with TypeScript types, handles, and Zustand integration. Use when building custom nodes for React Flow canvas, creating visual workflow editors, or implementing node-based UI components.
nodejs-best-practices
Node.js development principles and decision-making. Framework selection, async patterns, security, and architecture. Teaches thinking, not copying.
nodejs-backend-patterns
Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.
n8n-node-configuration
Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields, choosing between get_node detail levels, or learning common configuration patterns by node type.
bullmq-specialist
BullMQ expert for Redis-backed job queues, background processing, and reliable async execution in Node.js/TypeScript applications. Use when: bullmq, bull queue, redis queue, background job, job queue.