PACKAGE · QUEUE

bullmq

Queue for messages and jobs based on Redis

WEEKLY DOWNLOADS 8.9M
STARS 9.5K
FORKS 697
OPEN ISSUES 388
GZIP SIZE 145.6 kB
UNPACKED SIZE 3.0 MB
DEPENDENCIES 5
LAST UPDATED 7mo ago
DOWNLOAD TRENDS

bullmq downloads · last 12 months

Download trends for bullmq1 download series from Oct 2025 to Sep 2026. Use left and right arrow keys to inspect monthly values.08.9M17.7M26.6M35.5MOct 2025JanAprJulSep 2026
bullmq
ABOUT BULLMQ

BullMQ is a robust job queue system for Node.js, built upon Redis. It addresses the challenge of managing asynchronous tasks, background processing, and message queuing in modern web applications. By decoupling task execution from the main application thread, BullMQ ensures that your primary services remain responsive while background operations are handled efficiently and reliably.

The library is designed with a focus on developer experience and performance, drawing inspiration from libraries like Bull. Its architecture leverages Redis's capabilities for message persistence, atomic operations, and scalability. This makes it suitable for applications requiring dependable background job processing, such as sending emails, processing images, or performing complex calculations.

BullMQ exposes a clean API for creating jobs, processing them with workers, and monitoring their status. Key features include job retries with exponential backoff, delayed jobs, repeatable jobs, and configurable concurrency limits for workers. The use of `Queue` and `Worker` classes forms the core interaction pattern, allowing developers to dispatch work and define how that work is executed.

Its integration capabilities extend to various Node.js frameworks and architectures. Whether you're building a REST API with Express, a real-time application with Socket.IO, or a serverless function, BullMQ can be integrated to manage background tasks. The library also offers excellent TypeScript support, enhancing type safety and developer productivity.

With over 9.5K GitHub stars and 8.7M weekly downloads, BullMQ demonstrates significant community adoption and active development. Its unpacked size is 3.0 MB, with a gzipped bundle size of 145.6 kB, representing a reasonable trade-off for its extensive feature set. The active development, indicated by frequent updates and a substantial GitHub community, suggests a mature and well-maintained library.

While powerful, developers should be aware that BullMQ relies heavily on Redis. Maintaining a healthy Redis instance is crucial for the queue's operation. The 387 open issues, while typical for a project of this scale, indicate areas where community contributions or direct engagement might be needed for specific problems.

WHEN TO USE
  • When needing to process tasks asynchronously, such as sending emails or generating reports, without blocking the main application thread.
  • When implementing background job processing for computationally intensive operations like image resizing or data aggregation.
  • For scheduling recurring tasks or jobs that need to run at specific intervals using the repeatable jobs feature.
  • When requiring robust error handling with automatic retries and configurable backoff strategies for failed jobs.
  • For building real-time systems that need to queue and process events reliably using Redis as a message broker.
  • When leveraging Node.js worker threads or separate processes to offload heavy computation from the main event loop.
WHEN NOT TO USE
  • If your application only requires simple in-memory task scheduling without persistence or complex retry logic; consider a simpler in-process scheduler.
  • When you need a distributed locking mechanism but do not want to introduce Redis; explore native Node.js concurrency primitives or dedicated locking libraries.
  • If your primary requirement is a distributed pub/sub system without durable job queuing; Redis Streams or a dedicated pub/sub library might be more appropriate.
  • When all background tasks are trivial and can be completed within the request lifecycle; direct synchronous execution is sufficient and simpler.
  • If you prefer a solution that does not rely on external infrastructure like Redis; look for in-memory queue implementations or services with managed queues.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 2
bullmq vs bee-queue ★ 4.0K · 26.3K/wk bullmq vs agenda ★ 9.7K · 156.0K/wk