@nestjs/bullmq

Official NestJS integration module for BullMQ, bringing decorator-based job queues to Nest applications.

Library
npm
v12.0.0
703stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
83/100Excellent
Development Activity96
Maintenance84
Community64
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
76/100Good
Architecture82
Code Quality80
Innovation65
Learning Curve78

@nestjs/bullmq wires the BullMQ Redis-backed job queue library into NestJS’s dependency injection and module system, letting queues, producers, and processors be declared with the same @Module/@Injectable/decorator patterns used elsewhere in a Nest application. It registers queues via BullModule.registerQueue() (or forRootAsync for dynamic configuration), and exposes @Processor, @Process, and event decorators so job handlers and lifecycle listeners are just NestJS providers.

The package lives in the nestjs/bull monorepo alongside the older @nestjs/bull module (for the legacy Bull library) and a shared bull-shared package. @nestjs/bullmq is the actively recommended integration going forward, since it targets BullMQ — the actively maintained successor to Bull with Redis Streams-based reliability improvements — while @nestjs/bull remains for existing Bull-based codebases.

What You Get

  • BullModule.registerQueue() / forRootAsync() for declaring and configuring queues through NestJS’s module system, including async config via ConfigService
  • @Processor and @Process/@OnWorkerEvent decorators for defining job handlers and lifecycle listeners as ordinary injectable providers
  • Automatic queue and worker lifecycle management tied to the Nest application’s own bootstrap and shutdown hooks
  • Support for named jobs, job options (delay, priority, repeat, backoff), and flow producers exposed through BullMQ’s API
  • Testing utilities for mocking queues in unit tests without a live Redis connection
  • TypeScript types covering job payloads, processor return values, and queue events

Common Use Cases

  • Offloading slow work (email sending, report generation, image processing) from NestJS HTTP request handlers into background jobs
  • Building scheduled or recurring tasks using BullMQ’s repeatable jobs from within a Nest service
  • Coordinating multi-step workflows with BullMQ flow producers, orchestrated through Nest’s DI-managed processors
  • Rate-limiting and throttling outbound API calls by routing them through a Nest-managed BullMQ queue with concurrency limits
  • Migrating an existing Bull-based Nest app to BullMQ using the parallel @nestjs/bullmq module while keeping familiar Nest module patterns

Under The Hood

Architecture - The bullmq package (packages/bullmq/lib) centers on bull.module.ts, bull.providers.ts, and bull.registrar.ts, which translate BullModule.registerQueue() calls into NestJS dynamic-module providers that construct and cache BullMQ Queue/Worker instances per queue name. bull.explorer.ts scans the application’s provider metadata at bootstrap for @Processor/@Process-decorated classes and methods and wires them to the corresponding BullMQ worker, so job processing hooks into Nest’s own module-instantiation and lifecycle-event system rather than requiring separate startup code.

Tech Stack - Written in TypeScript, published from a Lerna-managed monorepo (nestjs/bull) that also contains the legacy @nestjs/bull (for Bull) and a bull-shared package with logic reused by both. @nestjs/bullmq’s only queue-engine dependency is the peer package bullmq itself, plus @nestjs/core/@nestjs/common as peer dependencies for the DI integration; it does not bundle Redis client code, relying on BullMQ’s own Redis (ioredis) connection handling.

Code Quality - The package has unit specs alongside an e2e/ directory with a dedicated vitest.config.e2e.mts, indicating processors and queue registration are verified against a real BullMQ/Redis instance rather than mocks alone. Renovate is configured at the monorepo root to keep BullMQ and NestJS core dependency versions current, and oxlint.json enforces consistent linting across all three packages in the repo.

API Design - The module deliberately mirrors NestJS’s existing conventions: registering a queue looks like registering any other dynamic module, and defining a processor looks like defining a controller or service with decorated methods. This keeps the learning curve low for teams already using NestJS, though it does mean the module’s ergonomics are bounded by BullMQ’s own API surface for job options, retries, and flows — @nestjs/bullmq adds DI wiring on top rather than a new abstraction.

Used by 15 apps in this directory

TypeScript
87%
Other

AFFiNE

Productivity · Project Management · Note Taking

72,238

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
67
Dependency
Built with
TypeScript87%
Updated yesterday
TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,588

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
74
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated yesterday
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,884

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

View details
91
Repo Health
77
Technical
61
Dependency
Built with
TypeScript97%
Updated yesterday
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,884

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

View details
91
Repo Health
77
Technical
61
Dependency
Built with
TypeScript97%
Updated yesterday
TypeScript
96%
Other

Cal.diy

Scheduling

48,218

The 100% MIT-licensed, community-driven scheduling platform — self-host your own booking infrastructure with no enterprise strings attached.

View details
95
Repo Health
86
Technical
65
Dependency
Built with
TypeScript96%
Updated yesterday
TypeScript
95%
AGPL 3.0

Docmost

Productivity · Note Taking · Collaboration

21,600

Self-hosted collaborative wiki and knowledge base with real-time editing, diagrams, AI assistance, and enterprise access controls — a modern alternative to Confluence and Notion.

View details
89
Repo Health
70
Technical
70
Dependency
Built with
TypeScript95%
Updated yesterday
TypeScript
76%
AGPL 3.0

Ghostfolio

Invoicing Finance

9,252

Track your stocks, ETFs, and crypto with a privacy-first, self-hostable wealth management platform built for data-driven investors.

View details
93
Repo Health
79
Technical
67
Dependency
Built with
TypeScript76%
HTML21%
Updated yesterday
TypeScript
95%
AGPL 3.0

HeyForm

Forms Surveys · No Code Platforms

8,965

Open-source conversational form builder with AI generation, conditional logic, and 30+ integrations — self-host with full data ownership.

View details
85
Repo Health
67
Technical
67
Dependency
Built with
TypeScript95%
Updated 1 weeks ago
TypeScript
94%
AGPL 3.0

Laudspeaker

Marketing · Automation

2,620

Open-source customer engagement platform for building visual, event-triggered messaging journeys across email, SMS, push, in-app, and webhooks.

View details
51
Repo Health
66
Technical
62
Dependency
Built with
TypeScript94%
Updated 1 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search