跳转至

介绍

Bull 是 BullMQ 的遗留版本。由于它在今天仍然被大量使用,所以它也被用于 bug 的维护,而不是用于新的主要功能。 如果你想使用一个经过战斗测试的队列库,你不需要更好的 typescript 集成,也不需要最新的特性,你可以在未来几年使用这个库。

所使用的

长期以来,Bull 一直是 NodeJS 生态系统的一部分,许多组织在商业和开源项目中都使用了 Bull。 特别提到几点:




The fastest, most reliable, Redis-based queue for Node.
Carefully written for rock solid stability and atomicity.


Sponsors · Features · UIs · Install · Quick Guide · Documentation

Check the new Guide!


📻 新闻和更新

Follow me on Twitter for important news and updates.

🛠 手册

You can find tutorials and news in this blog: https://blog.taskforce.sh/


被使用

Bull is popular among large and small organizations, like the following ones:

Atlassian Autodesk Mozilla Nest Salesforce

BullMQ

如果你想开始使用完全用 Typescript 编写的下一个主要版本的 Bull,欢迎使用新的 repo这里。 否则,我们非常欢迎你仍然使用 Bull,这是一个安全的、经过战斗测试的代码库。


🚀 贡献 🚀

RedisGreen

If you need high quality production Redis instances for your Bull projects, please consider subscribing to RedisGreen, leaders in Redis hosting that works perfectly with Bull. Use the promo code "BULLMQ" when signing up to help us sponsor the development of Bull!


官方的前端

Taskforce.sh, Inc

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


Bull 特性

  • [x] Minimal CPU usage due to a polling-free design.
  • [x] Robust design based on Redis.
  • [x] Delayed jobs.
  • [x] Schedule and repeat jobs according to a cron specification.
  • [x] Rate limiter for jobs.
  • [x] Retries.
  • [x] Priority.
  • [x] Concurrency.
  • [x] Pause/resume—globally or locally.
  • [x] Multiple job types per queue.
  • [x] Threaded (sandboxed) processing functions.
  • [x] Automatic recovery from process crashes.

And coming up on the roadmap...

  • [ ] Job completion acknowledgement (you can use the message queue pattern in the meantime).
  • [ ] Parent-child jobs relationships.

UIs

There are a few third-party UIs that you can use for monitoring:

BullMQ

Bull v3

Bull <= v2


监测和报警


特征比较

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
Parent/Child Dependencies
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

安装

Bash
npm install bull --save

or

Bash
yarn add bull

Requirements: Bull requires a Redis version greater than or equal to 2.8.18.

Typescript 定义

Bash
npm install @types/bull --save-dev
Bash
yarn add --dev @types/bull

Definitions are currently maintained in the DefinitelyTyped repo.


贡献

We welcome all types of contributions, either code fixes, new features or doc improvements. Code formatting is enforced by prettier. For commits please follow conventional commits convention. All code must pass lint rules and test suites before it can be merged into develop.


回到页面顶部