Created
May 13, 2025 13:14
-
-
Save AnteaterKit/e53bfe80bf9c7a5abe36bf484c34b96a to your computer and use it in GitHub Desktop.
mq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imports | |
HttpModule | |
BullModule.forRootAsync({ | |
imports: [ConfigModule], | |
useFactory: async (configService: ConfigService) => { | |
const connection = configService.get('redisconnection'); | |
return { | |
connection: connection, | |
} | |
}, | |
inject: [ConfigService], | |
}), | |
BullModule.registerQueue({ | |
name: Queues., | |
}), | |
BullBoardModule.forRoot({ | |
route: '/queues', | |
adapter: ExpressAdapter // Or FastifyAdapter from `@bull-board/fastify` | |
}), | |
BullBoardModule.forFeature({ | |
name: Queues, | |
adapter: BullMQAdapter, //or use BullAdapter if you're using bull instead of bullMQ | |
}), | |
providers | |
{ | |
provide: Consumer, | |
useFactory: (configService: ConfigService, pm: ManagerService) => { | |
const mqEnabled = configService.get('mqEnabled'); | |
return mqEnabled ? new Consumer(pm, configService) : null; | |
}, | |
inject: [ConfigService, ProxyManagerService], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment