background jobs (یہ کام جو HTTP response کو block نہیں کرنا چاہیے) کے لیے، NestJS BullMQ (ایک Redis-backed queue) کے ساتھ @nestjs/bullmq کے ذریعے integrate کرتا ہے۔ آپ ایک queue میں jobs شامل کرتے ہیں اور انہیں الگ الگ workers میں asynchronously process کرتے ہیں — requests کو تیز رکھتے ہوئے اور بھاری یا deferred work کو قابل اعتماد انداز میں سنبھالتے ہوئے۔
مسئلہ جو 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
