バックグラウンドジョブ(HTTPレスポンスをブロックすべきでない処理)の場合、NestJSは@nestjs/bullmqを通じてBullMQ(Redisベースのキュー)と統合されています。ジョブをキューに追加し、別のワーカーで非同期に処理します — リクエストを高速に保ちながら、重い処理や遅延処理を確実に処理できます。
キューが解決する問題
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
