Skip to content
BullMQ - Premium Message Queue for NodeJS based on Redis
TypeScript Lua JavaScript
Branch: master
Clone or download
semantic-release-bot chore(release): 1.6.0 [skip ci]nn# [1.6.0](v1.5.0...v1.6.0) (2019-12-12)
### Features

* add generic type to job data and return value ([87c0531](87c0531))
Latest commit fd5e524 Dec 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitbook/assets GitBook: [master] 22 pages and one asset modified Oct 15, 2019
docs/gitbook docs: add github link to what-is-bullmq.md (#80) Dec 4, 2019
src Merge branch 'master' into feat/add-generic-type-to-job-data Dec 12, 2019
.gitbook.yaml docs: add missing colon Oct 15, 2019
.gitignore feat: added code coverage and coveralls Nov 3, 2019
.travis.yml
CHANGELOG.md chore(release): 1.6.0 [skip ci]nn# [1.6.0](v1.5.0...v1.6.0) (2019-12-12) Dec 12, 2019
LICENSE Initial commit Dec 19, 2018
README.md docs: move gitbook documentation Oct 15, 2019
commitlint.config.js feat: ignore commitlint file in coverage Nov 3, 2019
package.json
tsconfig.json fix: several fixes to make the lib work on other ts projects Sep 22, 2019
tslint.json fix: fix several floating promises Sep 29, 2019
yarn.lock feat: remove delay dependency Nov 22, 2019

README.md




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

Read the documentation

Follow @manast for Bull news and updates!

The gist

Install:

$ yarn add bullmq

Add jobs to the queue:

import { Queue } from 'bullmq';

const queue = new Queue('Paint');

queue.add('cars', { color: 'blue' });

Process the jobs in your workers:

import { Worker } from 'bullmq';

const worker = new Worker('Paint', async job => {
  if (job.name === 'cars') {
    await paintCar(job.data.color);
  }
});

Listen to jobs for completion:

import { QueueEvents } from 'bullmq';

const queueEvents = new QueueEvents('Paint');

queueEvents.on('completed', jobId => {
  console.log('done painting');
});

queueEvents.on('failed', (jobId, err) => {
  console.error('error painting', err);
});

This is just scratching the surface, check all the features and more in the official documentation

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.

You can’t perform that action at this time.