dataqueue-core

Enforce typed PayloadMap job queues with handlers across PostgreSQL and Redis.

24|1|Updated Jun 27, 2025
One-click install
npx skills add https://github.com/nicnocquee/dataqueue --skill dataqueue-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dataqueue-core
Source: https://github.com/nicnocquee/dataqueue/tree/main/packages/dataqueue/ai/skills/dataqueue-core
Command: npx skills add https://github.com/nicnocquee/dataqueue --skill dataqueue-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Core patterns for using @nicnocquee/dataqueue with TypeScript: enforce typed payloads, safe handler wiring, and consistent queue initialization to reduce runtime errors.

Core Features & Use Cases

  • Typed PayloadMap: map job types to payload shapes and guarantee handler coverage.
  • JobHandlers binding: implement per-job logic with typings and abort signal awareness.
  • Singleton queue initialization: share a single queue instance to avoid multiple pools.
  • Enqueue & processing: addJob, addJobs, dependencies, retries, and processing workflows across supported backends.
  • Optional advanced scenarios: transactional creation in PostgreSQL and dead-letter routing.

Quick Start

Create a JobPayloadMap, implement handlers, initialize the queue once, then add a sample job to begin processing.

Frequently Asked Questions about dataqueue-core

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

FAQPage Schema
How do I set up a type-safe job queue in TypeScript?

To set up a type-safe job queue in TypeScript, define a PayloadMap mapping job types to payload shapes, implement corresponding JobHandlers, and initialize a singleton queue instance. This enforces typed payloads and guarantees handler coverage to reduce runtime errors.

Can I use a typed job queue with both PostgreSQL and Redis backends?

Yes, you can use this typed job queue with both PostgreSQL and Redis backends. The core patterns support reliable enqueue and dequeue behavior, batching, dependencies, and retries across both supported storage backends for server-side applications.

What is a PayloadMap in TypeScript job queue orchestration?

A PayloadMap in TypeScript job queue orchestration is a mapping of job types to their specific payload shapes. It guarantees that every job type has a corresponding handler with the correct typings, enforcing safe handler wiring and reducing runtime errors.

How do I handle retries and dead-letter routing for background jobs?

You handle retries and dead-letter routing by configuring the queue processing workflow with explicit retry logic. The core patterns support optional advanced scenarios including transactional job creation in PostgreSQL and dead-letter routing for failed jobs.

Why should I use a singleton queue instance instead of creating multiple pools?

You should use a singleton queue instance to share a single queue connection across your application. This initialization pattern avoids creating multiple connection pools, ensuring consistent and efficient job processing across PostgreSQL or Redis backends.