My goal is to set up multiple queues in NestJs, and according to the documentation:
You can create multiple queues by providing multiple comma-separated configuration objects to the registerQueue() method.
However, I am encountering an issue where VScode is suggesting that I need to include Bull options after the comma. Below is my current configuration for a single queue, how can I properly register multiple queues?
@Module({
imports: [
ConfigModule,
BullModule.registerQueueAsync({
name: 'Queue1',
imports: [ConfigModule],
useFactory: async (configService: ConfigService) => ({
redis: {
host: configService.get('QUEUE_HOST'),
port: +configService.get('QUEUE_PORT'),
},
}),
inject: [ConfigService],
}),
HttpModule,
],
controllers: [ScheduleController],
providers: [MainConsumer], //Service is included here
})
export class AppModule {}