Skip to content

[BE-04] Configure BullMQ queue infrastructure for async job processing #877

Description

@yusuftomilola

Overview

@nestjs/bull and bull are installed in package.json but never configured. Async processing (email sending, report generation, Stellar transactions, notification dispatch) must not block HTTP request handlers. This issue sets up the queue infrastructure that all async features will use.

Context

  • package.json has @nestjs/bull@11.0.4 and bull@4.16.5 installed
  • Redis connection will be shared with the caching layer (BE-05)
  • Queue names should be centralised in a constants file to avoid magic strings across modules
  • .env.example needs REDIS_HOST and REDIS_PORT added

Acceptance Criteria

  • Add REDIS_HOST (default: localhost) and REDIS_PORT (default: 6379) to backend/.env.example
  • Register BullModule.forRootAsync() in AppModule using ConfigService for the Redis connection
  • Create src/queue/queue.constants.ts with exported queue name constants (e.g., MAIL_QUEUE, NOTIFICATION_QUEUE, REPORT_QUEUE, STELLAR_QUEUE)
  • Create src/queue/queue.module.ts that other modules import to register specific queues
  • Verify the queue connects to Redis on app startup with a logged confirmation message
  • Document how to add a new queue and processor in a code comment on queue.module.ts

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions