BullMQ 6

Last reviewed Sep 19, 2026

Export as PDF

Prompt Details

Prompt Composition

4prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. Node.js 24101 lines · 5.3K tokens
  3. TypeScript 746 lines · 1.5K tokens
  4. BullMQ 668 lines · 3.3K tokens
Total317 lines · 13.2K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 73
  • 78
  • 79
  • 88
  • 89
  • 95
  • 113
  • 117
  • 200
  • 208
  • 209
  • 214
  • 250
  • 287
  • 295
  • 297
  • 312
  • 319
  • 323
  • 330
  • 338
  • 346
  • 347
  • 352
  • 354
  • 362
  • 367
  • 377
  • 426
  • 444
  • 459
  • 471
  • 488
  • 494
  • 502
  • 524
  • 532
  • 602
  • 639
  • 653
  • 667
  • 732
  • 754
  • 770
  • 807
  • 829
  • 838
  • 841
  • 862
  • 863
  • 908
  • 915
  • 916
  • 918
  • 922
  • 942
  • 943
  • 1004
  • 1321
  • 1333

Prompt Preview

Apply the Node.js 24, TypeScript 7, and JavaScript ES2026 prompts first. These rules target BullMQ 6 on Node.js with its Redis or optional PostgreSQL backend, and were checked against 6.3.2. Apply backend-specific rules only to the backend in use.

Backend and version boundaries

  • Select the same trusted backend for producers, workers, flows, and events. Redis is the default; pass createPostgresBackend explicitly for PostgreSQL, or set setDefaultBackendFactory once during trusted startup. Never select factories or connection targets from job data.
  • Install the chosen driver explicitly: ioredis >=5, redis >=5 with createNodeRedisClient, or pg >=8. These are optional peers, not bundled connection guarantees; verify the resolved driver's runtime requirements against the Node.js 24 deployment.
  • Restrict getBackend() and raw client access to reviewed infrastructure code. Custom IQueueBackend implementations and RedisConnection.clientFactory replacements must preserve atomic transitions, lock ownership, authenticated connections, and reconnect behavior; TypeScript interface conformance alone establishes none of these guarantees.
  • Account for the blocking-client reconnect liveness fix introduced in 6.3.3: exercise prolonged Redis outages before deploying 6.3.2, monitor actual job progress, and use a reviewed fixed patch or backport when this failure affects the deployment.

Job admission and authority

  • Validate a versioned job envelope before Queue.add, addBulk, scheduler creation, and flow submission, then validate again in each processor before