Untuk background jobs (pekerjaan yang tidak boleh memblokir respons HTTP), NestJS terintegrasi dengan BullMQ (queue berbasis Redis) melalui @nestjs/bullmq. Anda menambahkan jobs ke antrian dan memrosesnya secara asinkron di worker terpisah — menjaga request tetap cepat dan menangani pekerjaan berat atau tertunda dengan andal.
Masalah yang diselesaikan queues
Some work is too slow or shouldn't block the request:
✗ sending emails, processing images/video, generating reports, calling slow APIs
→ doing it inline makes the user wait and risks timeouts/failures
✓ QUEUE the work → respond immediately → a worker processes it in the background
