Task Queue Deloader is a background job processing system that integrates RabbitMQ and BullMQ (Redis) to efficiently handle asynchronous tasks. It provides reliability, automatic retries, monitoring, and easy scaling, making it ideal for microservices and high-load applications.
- ✅ RabbitMQ Integration – Accepts tasks from external services.
- ✅ BullMQ (Redis) for Queue Management – Manages job execution efficiently.
- ✅ Automatic Retries – Configurable attempts and exponential backoff.
- ✅ Prometheus & Grafana Monitoring – Track system performance with real-time metrics.
- ✅ Docker Support – Easy deployment with Redis, RabbitMQ, and Prometheus.
- ✅ WebSockets (Planned) – Optional real-time task updates.
To start the required services, use Docker:
# Start RabbitMQ with management UI
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:management
# Start Redis
docker run -d --name redis -p 6379:6379 redisAlternatively, start all services using docker-compose:
docker-compose up -dnpm installnpm run start:devThe service will be available at http://localhost:3020.
To send a task directly to RabbitMQ, use the provided TaskProducer:
await taskProducer.sendToQueue('email-queue', { message: 'Send email' });Workers listen for tasks and process them asynchronously:
@Process('process-task')
async handleTask(job: Job) {
console.log(`Processing task ${job.id}:`, job.data);
}Visit http://localhost:15672 and log in with:
- Username:
guest - Password:
guest
curl http://localhost:3020/metrics- Prometheus scrapes metrics automatically at http://localhost:9090.
- Available metrics include completed jobs, queue size, and processing time.
- Install and start Grafana:
docker run -d --name grafana -p 3000:3000 grafana/grafana
- Connect it to Prometheus (
http://localhost:9090). - Use the built-in dashboards or create custom visualizations.
Run unit and integration tests to verify functionality:
npm run testThis project is licensed under the MIT license.
🚀 Now your task queue system is ready for production!