queue-scheduler

Configure BullMQ workers, schedulers, and task routing for Madoc TS queues.

57|15|Updated Nov 28, 2018
One-click install
npx skills add https://github.com/digirati-co-uk/madoc-platform --skill queue-scheduler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: queue-scheduler
Source: https://github.com/digirati-co-uk/madoc-platform/tree/main/.agents/skills/queue-scheduler
Command: npx skills add https://github.com/digirati-co-uk/madoc-platform --skill queue-scheduler

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill documents and guides changes to Madoc TS background job processing using BullMQ so that task dispatch, retries, and event handling remain consistent and reliable across workers and schedulers. It helps prevent misrouted tasks, lost retries, and configuration mismatches that can cause silent failures in asynchronous processing.

Core Features & Use Cases

  • Review and adjust BullMQ worker configuration, including concurrency and Redis connection settings.
  • Verify scheduler setup, QueueEvents listeners, and retry/logging behavior for robust failure handling.
  • Map task types to their gateway/task handlers to ensure new or updated tasks are correctly routed and executed. Use case: When adding a new task type or changing Redis or concurrency settings, update producer and scheduler logic and verify end-to-end job processing.

Quick Start

Use the queue-scheduler skill to inspect services/madoc-ts queue producer and scheduler, update any handler mappings, and confirm an enqueued job is processed successfully.

Frequently Asked Questions about queue-scheduler

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure BullMQ worker concurrency and Redis connections for background task processing?

Configure BullMQ worker concurrency and Redis connections by adjusting the worker settings in your queue producer and scheduler. This ensures reliable background task processing, prevents silent failures, and maintains consistent job dispatch across workers.

How do I route BullMQ tasks to specific gateway handlers in a TypeScript service?

Route BullMQ tasks to specific gateway handlers by mapping task types to their corresponding gateway/task handlers in your scheduler logic. This ensures new or updated tasks are correctly dispatched and executed without misrouting jobs.

Why are my BullMQ background jobs failing silently without retries?

BullMQ background jobs fail silently when scheduler setup, QueueEvents listeners, or retry configurations are mismatched. Verify your scheduler event hooks and logging behavior to ensure robust failure handling and prevent lost retries during asynchronous processing.

What is the best way to add a new task type to an existing BullMQ queue system?

Add a new task type to a BullMQ queue system by updating the producer and scheduler logic with new handler mappings, then verifying end-to-end job processing. This confirms the enqueued job is successfully processed and correctly routed through the gateway.

How do I safely dispose of per-job contextual APIs when a BullMQ worker shuts down?

Safely dispose of per-job contextual APIs during BullMQ worker shutdown by following safe disposal practices outlined in the scheduler configuration. This prevents resource leaks and maintains stable background job processing during service interruptions.

Do I need Redis configuration to use BullMQ schedulers and QueueEvents listeners?

Redis configuration is required to use BullMQ schedulers and QueueEvents listeners. Proper Redis connection settings ensure stable worker concurrency, reliable event handling, and consistent job dispatch across your background task processing infrastructure.