สำหรับ background job (งานที่ไม่ควรบล็อก HTTP response) NestJS ผสานรวมกับ BullMQ (queue ที่ใช้ Redis เป็นฐานหลัง) ผ่าน @nestjs/bullmq คุณเพิ่ม job เข้า queue และประมวลผลแบบ asynchronous ใน worker แยกต่างหาก ทำให้ request เร็วและจัดการงานหนักหรืองานที่เลื่อนเวลาได้อย่างน่าเชื่อถือ
ปัญหาที่ queue ช่วยแก้
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
