Producers
import { Injectable } from '@nestjs/common';
import { InjectQueue } from '@nestjs/bullmq';
import { Queue } from 'bullmq';
@Injectable()
export class AudioService {
constructor(@InjectQueue('audio') private audioQueue: Queue) {}
}const job = await this.audioQueue.add('sample', {
foo: 'bar',
});Flow Producers
import { Injectable } from '@nestjs/common';
import { InjectFlowProducer } from '@nestjs/bullmq';
import { FlowProducer } from 'bullmq';
@Injectable()
export class FlowService {
constructor(
@InjectFlowProducer('flow') private fooFlowProducer: FlowProducer,
) {}
}Read more:
Last updated
Was this helpful?