Queue Provider Factory
Creates the appropriate queue provider based on configuration provided via QueueModule.forRootAsync().
Provider Selection:
cloudflare
sync
// Configuration via QueueModule.forRootAsync()QueueModule.forRootAsync({ inject: [CONFIG_TOKENS.ConfigService], useFactory: (config) => ({ provider: config.get('queue').provider })})// Factory usage (internal)const factory = container.resolve(QueueProviderFactory)const provider = factory.create() Copy
// Configuration via QueueModule.forRootAsync()QueueModule.forRootAsync({ inject: [CONFIG_TOKENS.ConfigService], useFactory: (config) => ({ provider: config.get('queue').provider })})// Factory usage (internal)const factory = container.resolve(QueueProviderFactory)const provider = factory.create()
Optional
Create a queue provider based on module configuration
Queue provider instance
If provider type is not supported
Queue Provider Factory
Creates the appropriate queue provider based on configuration provided via QueueModule.forRootAsync().
Provider Selection:
cloudflare: Production provider using Cloudflare Queue bindingssync: Testing provider that processes messages immediatelyExample