bullmq-job-architect

Designs and implements BullMQ job queues with Redis, workers, retries, and dead letter queues.

1|Updated Sep 3, 2026
One-click install
npx skills add https://github.com/sabiscore/the-yap-engine --skill bullmq-job-architect-sabiscore
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bullmq-job-architect
Source: https://github.com/sabiscore/the-yap-engine/tree/main/.ai/skills/bullmq-job-architect
Command: npx skills add https://github.com/sabiscore/the-yap-engine --skill bullmq-job-architect-sabiscore

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bullmq, ioredis, @bull-board/api, @bull-board/fastify.

What problem does it solve? Setting up background job processing with BullMQ involves non-obvious production pitfalls: shared Redis connections cause deadlocks, default worker concurrency of 1 bottlenecks throughput, and failed jobs vanish without a dead letter queue. This Skill guides you through designing isolated, correctly sized, failure-safe queue systems. ## Core Features & Use Cases - Queue Architecture: One queue per job type with separate ioredis connections for Queue, Worker, and QueueEvents roles. - Worker Sizing & Rate Limiting: Concurrency formula based on provider rate limits and job duration, plus BullMQ limiter configuration for external APIs. - Failure Handling: Exponential backoff retries, dead letter queues with replay, job flows for dependent tasks, cron scheduling with stable job IDs, and graceful shutdown. - Monitoring: Bull Board dashboard integration with Fastify and authentication middleware. - Use Case: You need to send transactional emails, generate PDFs, and call LLM APIs in the background. This Skill produces three isolated queues with provider-aware rate limits, a DLQ for exhausted retries, and a Bull Board UI at /admin/queues. ## Quick Start Ask the AI to set up a BullMQ background job architecture for your task, for example: set up BullMQ queues with workers, retries, and a dead letter queue for email dispatch and PDF generation.

Frequently Asked Questions about bullmq-job-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a BullMQ job queue with Redis?▼

Create a Queue instance with its own ioredis connection, then a Worker with a separate connection to consume jobs. Set maxRetriesPerRequest to null and enableReadyCheck to false in the Redis options, since reusing one connection across roles causes deadlocks.

How to configure BullMQ worker concurrency and rate limiting?▼

Size concurrency with the formula ceil(rate_limit_per_sec × avg_job_duration_sec × 1.2 buffer), or use os.cpus().length for CPU-bound jobs. Add a limiter option with max and duration to respect external API quotas like email provider limits.

How do I handle failed jobs in BullMQ with a dead letter queue?▼

Configure attempts with exponential backoff in defaultJobOptions, then in the worker failed event check if attemptsMade exhausted the retry limit and move the job to a dedicated dead-letter queue. DLQ jobs store the original queue, data, and error so they can be replayed manually.

Does BullMQ support scheduled recurring cron jobs?▼

Yes, BullMQ supports recurring jobs via the repeat option with a cron pattern when adding a job. Always set a stable jobId for recurring jobs to prevent duplicate registration, and use removeRepeatable to unregister them.

Why does my BullMQ worker hang or deadlock with Redis?▼

Deadlocks typically happen when Queue, Worker, and QueueEvents share a single ioredis connection. BullMQ requires a separate connection instance per role, and worker connections must set maxRetriesPerRequest to null and enableReadyCheck to false.

How do I monitor BullMQ queues with Bull Board?▼

Install @bull-board/fastify and @bull-board/api, wrap each queue in a BullMQAdapter, and register the FastifyAdapter plugin at a path like /admin/queues. Protect the dashboard route with authentication middleware before exposing it.