BullMQ - Message Queue and Batch processing for NodeJS and Python based on Redis
Installations
npm install bullmq
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
22.12.0
NPM Version
10.9.0
Score
63.6
Supply Chain
100
Quality
94.9
Maintenance
100
Vulnerability
99.3
License
Releases
Contributors
Languages
TypeScript (81.86%)
Lua (9.07%)
Python (8.83%)
JavaScript (0.19%)
Shell (0.05%)
Developer
Download Statistics
Total Downloads
63,845,079
Last Day
39,768
Last Week
542,925
Last Month
3,250,396
Last Year
33,822,091
GitHub Statistics
6,338 Stars
2,689 Commits
414 Forks
33 Watching
34 Branches
152 Contributors
Package Meta Information
Latest Version
5.34.5
Package Id
bullmq@5.34.5
Unpacked Size
1.82 MB
Size
287.72 kB
File Count
800
NPM Version
10.9.0
Node Version
22.12.0
Publised On
25 Dec 2024
Total Downloads
Cumulative downloads
Total Downloads
63,845,079
Last day
-72.8%
39,768
Compared to previous day
Last week
-29.6%
542,925
Compared to previous week
Last month
-3.5%
3,250,396
Compared to previous month
Last year
74.9%
33,822,091
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
56
The fastest, most reliable, Redis-based distributed queue for Node.
Carefully written for rock solid stability and atomicity.
Follow @manast for *important* Bull/BullMQ/BullMQ-Pro news and updates!
🛠 Tutorials
You can find tutorials and news in this blog: https://blog.taskforce.sh/
News 🚀
🌐 Language agnostic BullMQ
Do you need to work with BullMQ on platforms other than Node.js? If so, check out the BullMQ Proxy
Official FrontEnd
Supercharge your queues with a professional front end:
- Get a complete overview of all your queues.
- Inspect jobs, search, retry, or promote delayed jobs.
- Metrics and statistics.
- and many more features.
Sign up at Taskforce.sh
🚀 Sponsors 🚀
Dragonfly is a new Redis™ drop-in replacement that is fully compatible with BullMQ and brings some important advantages over Redis™ such as massive better performance by utilizing all CPU cores available and faster and more memory efficient data structures. Read more here on how to use it with BullMQ. |
Used by
Some notable organizations using BullMQ:
The gist
Install:
$ yarn add bullmq
Add jobs to the queue:
1import { Queue } from 'bullmq'; 2 3const queue = new Queue('Paint'); 4 5queue.add('cars', { color: 'blue' });
Process the jobs in your workers:
1import { Worker } from 'bullmq';
2
3const worker = new Worker('Paint', async job => {
4 if (job.name === 'cars') {
5 await paintCar(job.data.color);
6 }
7});
Listen to jobs for completion:
1import { QueueEvents } from 'bullmq'; 2 3const queueEvents = new QueueEvents('Paint'); 4 5queueEvents.on('completed', ({ jobId }) => { 6 console.log('done painting'); 7}); 8 9queueEvents.on( 10 'failed', 11 ({ jobId, failedReason }: { jobId: string; failedReason: string }) => { 12 console.error('error painting', failedReason); 13 }, 14);
This is just scratching the surface, check all the features and more in the official documentation
Feature Comparison
Since there are a few job queue solutions, here is a table comparing them:
Feature | BullMQ-Pro | BullMQ | Bull | Kue | Bee | Agenda |
---|---|---|---|---|---|---|
Backend | redis | redis | redis | redis | redis | mongo |
Observables | ✓ | |||||
Group Rate Limit | ✓ | |||||
Group Support | ✓ | |||||
Batches Support | ✓ | |||||
Parent/Child Dependencies | ✓ | ✓ | ||||
Debouncing | ✓ | ✓ | ✓ | |||
Priorities | ✓ | ✓ | ✓ | ✓ | ✓ | |
Concurrency | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Delayed jobs | ✓ | ✓ | ✓ | ✓ | ✓ | |
Global events | ✓ | ✓ | ✓ | ✓ | ||
Rate Limiter | ✓ | ✓ | ✓ | |||
Pause/Resume | ✓ | ✓ | ✓ | ✓ | ||
Sandboxed worker | ✓ | ✓ | ✓ | |||
Repeatable jobs | ✓ | ✓ | ✓ | ✓ | ||
Atomic ops | ✓ | ✓ | ✓ | ✓ | ||
Persistence | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
UI | ✓ | ✓ | ✓ | ✓ | ✓ | |
Optimized for | Jobs / Messages | Jobs / Messages | Jobs / Messages | Jobs | Messages | Jobs |
Contributing
Fork the repo, make some changes, submit a pull-request! Here is the contributing doc that has more details.
Thanks
Thanks for all the contributors that made this library possible, also a special mention to Leon van Kammen that kindly donated his npm bullmq repo.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
packaging workflow detected
Details
- Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:11
Reason
SAST tool detected but not run on all commits
Details
- Info: SAST configuration detected: CodeQL
- Warn: 16 commits out of 17 are checked with a SAST tool
Reason
dependency not pinned by hash detected -- score normalized to 5
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:136: update your workflow using https://app.stepsecurity.io/secureworkflow/taskforcesh/bullmq/test.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:106: update your workflow using https://app.stepsecurity.io/secureworkflow/taskforcesh/bullmq/test.yml/master?enable=pin
- Warn: pipCommand not pinned by hash: .github/workflows/release.yml:45
- Warn: pipCommand not pinned by hash: .github/workflows/release.yml:46
- Warn: pipCommand not pinned by hash: .github/workflows/release.yml:47
- Warn: pipCommand not pinned by hash: .github/workflows/release.yml:58
- Warn: pipCommand not pinned by hash: .github/workflows/test.yml:202
- Warn: pipCommand not pinned by hash: .github/workflows/test.yml:203
- Warn: pipCommand not pinned by hash: .github/workflows/test.yml:204
- Info: 18 out of 20 GitHub-owned GitHubAction dependencies pinned
- Info: 5 out of 5 third-party GitHubAction dependencies pinned
- Info: 0 out of 7 pipCommand dependencies pinned
Reason
Found 7/26 approved changesets -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28
- Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29
- Warn: no topLevel permission defined: .github/workflows/api.yml:1
- Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Info: topLevel 'contents' permission set to 'read': .github/workflows/test.yml:17
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
10 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-248v-346w-9cwc
- Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-x3m3-4wpv-5vgc
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
Score
5.3
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More