Skip to main content
BullMQ has official NestJS integration through the @nestjs/bullmq package, providing decorators and modules for seamless integration with the NestJS framework.

Installation

Quick Start

1

Import BullModule in your root module

Configure the root BullModule with your Redis connection:
2

Register a queue

Register queues using BullModule.registerQueue():
3

Create a processor

Use the @Processor decorator to create a job processor:
4

Register the processor as a provider

Add the processor to your module’s providers:

Complete Example

Here’s a complete example with a module, processor, and service:
audio.module.ts
audio.processor.ts
audio.service.ts

Flow Producer

For complex job workflows, register and use a FlowProducer:
Inject and use the FlowProducer in your service:

Configuration Options

Override connection settings for specific queues:
Pass worker options through the processor:

NestJS Producers

Learn how to add jobs to queues in NestJS

Queue Events

Listen to queue events in NestJS

External Documentation

NestJS Queues Documentation

Official NestJS documentation for queue integration