@natiwo/queue
v1.0.0
Published
BullMQ wrapper with decorators and progress tracking
Maintainers
Readme
@natiwo/queue
BullMQ job queue management with TypeScript decorators
Installation
pnpm add @natiwo/queue bullmq ioredisFeatures
- 🚀 BullMQ Integration - Production-ready job queues
- 🎯 Decorators -
@QueueProcess,@QueueOptions - 🔄 Retry Logic - Exponential backoff
- 📊 Progress Tracking - Job progress updates
- ⚡ Concurrency - Parallel job processing
Quick Start
import { QueueManager, QueueProcess } from '@natiwo/queue';
const queueManager = new QueueManager({
connection: {
host: 'localhost',
port: 6379,
},
});
// Create queue
const emailQueue = queueManager.createQueue('emails');
// Add job
await emailQueue.addJob('send-welcome', {
to: '[email protected]',
subject: 'Welcome!',
});
// Process jobs
class EmailProcessor {
@QueueProcess('emails', 'send-welcome')
async sendWelcome(job: Job) {
await sendEmail(job.data);
return { sent: true };
}
}License
MIT © NATIWO Sistemas
