queue-processor
OfficialCreate reliable BullMQ queue processors
System Documentation
What problem does it solve?
This guide removes guesswork and prevents common mistakes when adding BullMQ queue processors and QueueServices to zoppy-api by documenting required session propagation, locking patterns, registration rules, and logging/retry expectations so background jobs run correctly and reliably.
Core Features & Use Cases
- Create a Request-scoped QueueService that enqueues jobs with standardized QueueEnum and QueueJobEnum values and uses centralized enqueue helpers and retry presets.
- Implement processors by extending QueueProcessorBase for normal jobs or ProviderQueueProcessorBase for exclusive per-company/provider processing with Redis locks and expiration.
- Ensure correct session propagation by calling setSession(job) at the start of process, configure concurrency and lockDuration, use structured logging and error re-throwing for retries, and register processors in exactly one pipeline module to avoid duplicate consumption.
- Common use cases: asynchronous provider syncs, message sending pipelines (WhatsApp/SMS/email), workflow execution steps, campaign processing, and general background tasks.
Quick Start
Create a Request-scoped QueueService and a Processor that calls await this.setSession(job) first, configures concurrency and lockDuration, uses the appropriate QueueJobEnum and QueueEnum, and registers the queue and processor in the correct module so jobs process reliably.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: queue-processor Download link: https://github.com/Zoppy-crm/.github/archive/main.zip#queue-processor Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.