@nestjs/bullmq

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

Library
npm
v11.0.5
700stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
84/100Excellent
Development Activity100
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 8 apps in this directory

TypeScript
88%
Other

AFFiNE

Productivity · Project Management · Note Taking

71,668

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
68
Dependency
Built with
TypeScript88%
Updated today
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,846

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
64
Dependency
Built with
TypeScript97%
Updated yesterday
TypeScript
95%
AGPL 3.0

Docmost

Productivity · Note Taking · Collaboration

21,411

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
71
Dependency
Built with
TypeScript95%
Updated yesterday
TypeScript
94%
AGPL 3.0

Laudspeaker

Marketing · Automation

2,618

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

View details
53
Repo Health
66
Technical
64
Dependency
Built with
TypeScript94%
Updated 1 months ago
TypeScript
96%
Other

Refly

No Code Platforms · AI Development · Automation

7,490

Build deterministic, versioned agent skills from natural language—run them anywhere from Claude Code to Slack.

View details
66
Repo Health
76
Technical
64
Dependency
Built with
TypeScript96%
Updated 3 weeks ago
TypeScript
97%
AGPL 3.0

Swetrix

Analytics

1,123

Privacy-first, cookieless web analytics with error tracking, session replays, and performance monitoring — self-host or use Cloud.

View details
87
Repo Health
71
Technical
71
Dependency
Built with
TypeScript97%
Updated yesterday
TypeScript
99%
Other

Teable

Databases · No Code Platforms

21,665

A no-code PostgreSQL database with spreadsheet UX, real-time collaboration, and native AI agents — built for teams that outgrow Airtable.

View details
79
Repo Health
76
Technical
64
Dependency
Built with
TypeScript99%
Updated today
JavaScript
59%
AGPL 3.0

ToolJet

Low Code Platforms · No Code Platforms · AI Agents

40,458

Open-source AI-native platform to build and deploy internal tools, workflows, and AI agents with a visual drag-and-drop builder and 80+ data source integrations.

View details
94
Repo Health
81
Technical
65
Dependency
Built with
JavaScript59%
TypeScript33%
Updated today

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