hero

Bee-Queue

Redis-backed job queue for Node.js.

Get Started →

Simple

Under 1000 lines of code, and the only dependency is the Redis client.

Fast

Maximizes throughput by minimizing Redis usage and network overhead. Leads performance benchmarks.

Robust

Designed with concurrency, atomicity, and failure in mind. Each line of code has two lines of tests.

Runs At Scale

Mixmax's back end uses Bee-Queue to process over a billion jobs every week. Read their blog post.

Modern JavaScript API

A fluent interface for adding timeouts, retry policies, and delayed execution. Works great with async/await.

Widely Used

Over 20,000 downloads per month. Read about who's using Bee-Queue.

Simple Getting Started:

Install:

npm install bee-queue 

Enqueue a job:

const Queue = require('bee-queue');
const queue = new Queue('example');

queue.createJob({x: 2, y: 3}).save().then(job => {
  job.on('succeeded', (result) => {
    console.log(`Received result for job ${job.id}: ${result}`);
  });
});

Process jobs from anywhere:

const Queue = require('bee-queue');
const queue = new Queue('example');

queue.process(async (job) => {
  console.log(`Processing job ${job.id}!!!!!!!!!!!`);
  return job.data.x + job.data.y;
});