Demo

Queue

Use BullMQ Queue instances for custom background work. For recurring schedules, use CronJobService (see Cron job).

Register a queue with @Bean

Expose BullMQ Queue instances through the DI container when you need a custom queue beyond CronJobService. Full @Bean rules are on the Bean annotations page.

TSXservice
1import { Queue } from "bullmq"; 2import { Bean, Service } from "@quan-erp/shared-backend-core"; 3 4@Service() 5export class QueueRegistryService { 6 @Bean() 7 private registerQueue() { 8 return new Queue("my-queue", { connection: redisOptions }); 9 } 10}

Scheduled work

Prefer the built-in CronJobService (BullMQ + Redis + Postgres) for cron schedules. See the Cron job page.