@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:Configuration Options
Per-Queue Configuration
Per-Queue Configuration
Override connection settings for specific queues:
Worker Options
Worker Options
Pass worker options through the processor:
Related Resources
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
