gitmyhub

bull

JavaScript ★ 16k updated 11d ago

Premium Queue package for handling distributed jobs and messages in NodeJS.

A Node.js job queue library backed by Redis that lets you run background tasks like sending emails or processing files reliably, with built-in retries, scheduling, and concurrency control.

JavaScriptNode.jsRedisTypeScriptsetup: moderatecomplexity 3/5

Bull is a job queue library for Node.js, built on Redis. A job queue lets one part of an application drop "tasks to do later" into a list, and have separate worker processes pick them up and run them in the background. This is useful whenever work — sending an email, transcoding a video, generating a PDF, calling a slow external API — takes too long to do inside a web request, or needs to be retried if it fails.

Bull stores its queues in Redis and is written for stability and atomicity, meaning jobs are not lost or processed twice even when things go wrong. You create a queue by name in your Node.js code, define a processing function for it, and then add jobs from anywhere else in the app. The library supports delayed jobs, repeating jobs scheduled with cron-style expressions, priority ordering, rate limiting, concurrency, retries on failure, and pause/resume controls applied globally or to one worker. Heavy processors can run in a sandboxed worker process so a crash in one job does not bring down the rest of the system, and the queue automatically recovers from process crashes.

You would reach for Bull when a Node.js application needs reliable background processing or a way to pass work between services through a shared queue. The README compares it to Kue, Bee and Agenda and highlights its rate limiter, sandboxed workers, and repeatable jobs as distinguishing features. Third-party UIs like Taskforce, Arena, bull-repl and bull-board let you monitor queues in a browser, and a Prometheus exporter is available.

The library is written in JavaScript for Node.js, requires Redis 2.8.18 or newer, and installs via npm or yarn. TypeScript definitions are available separately.

Where it fits