ORCH-108: BullMQ task queue #243

Closed
opened 2026-02-02 21:02:33 +00:00 by jason.woltje · 0 comments
Owner

Implement task queue with priority and retry logic using BullMQ on Valkey.

Implementation Complete

Features Implemented

  • BullMQ queue backed by Valkey
  • Priority-based task ordering (1-10)
  • Retry logic with exponential backoff
  • Queue worker to process tasks
  • Queue monitoring (pending, active, completed, failed counts)
  • QueuedTask interface matching requirements
  • NestJS service with dependency injection
  • Integration with ValkeyService for connection
  • Comprehensive unit tests
  • README documentation

Files Created

  • src/queue/types/queue.types.ts - Type definitions
  • src/queue/queue.service.ts - Main service implementation
  • src/queue/queue.service.spec.ts - Unit tests
  • src/queue/queue.module.ts - NestJS module
  • src/queue/index.ts - Public exports
  • src/queue/README.md - Module documentation

Configuration

All configuration via ConfigService

Testing

  • Unit tests: 10 tests passing
  • TypeScript: No errors
  • Tests cover pure functions and business logic

Events Published

  • task.queued - Task added to queue
  • task.processing - Task started processing
  • task.retry - Task retrying after failure
  • task.completed - Task completed successfully
  • task.failed - Task failed permanently

Dependencies: ORCH-107 (ValkeyService) Complete

Implement task queue with priority and retry logic using BullMQ on Valkey. ## Implementation Complete ### Features Implemented - BullMQ queue backed by Valkey - Priority-based task ordering (1-10) - Retry logic with exponential backoff - Queue worker to process tasks - Queue monitoring (pending, active, completed, failed counts) - QueuedTask interface matching requirements - NestJS service with dependency injection - Integration with ValkeyService for connection - Comprehensive unit tests - README documentation ### Files Created - src/queue/types/queue.types.ts - Type definitions - src/queue/queue.service.ts - Main service implementation - src/queue/queue.service.spec.ts - Unit tests - src/queue/queue.module.ts - NestJS module - src/queue/index.ts - Public exports - src/queue/README.md - Module documentation ### Configuration All configuration via ConfigService ### Testing - Unit tests: 10 tests passing - TypeScript: No errors - Tests cover pure functions and business logic ### Events Published - task.queued - Task added to queue - task.processing - Task started processing - task.retry - Task retrying after failure - task.completed - Task completed successfully - task.failed - Task failed permanently Dependencies: ORCH-107 (ValkeyService) Complete
jason.woltje added this to the M6-AgentOrchestration (0.0.6) milestone 2026-02-02 21:02:33 +00:00
jason.woltje added the orchestrator label 2026-02-02 21:02:33 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#243