Skip to content

Module: Background Job Queue

Composable background job processing with pluggable brokers. Ships with an in-memory provider for development and testing, a BullMQ provider for Redis-backed queues, and an AWS SQS provider for cloud-native workloads. Uses a self-registering provider registry so custom brokers can be added without modifying core code.

Namemodule-queue-ts
Version0.1.0
Categorycomposable-modules
LicenseApache-2.0
Personaengineering
Tagsqueue, jobs, background, typescript, workers
Sourcetemplates/module-queue-ts

Render it

Three front doors, one catalog. Pick whichever suits the caller.

# CLI
npx @nanohype/sdk render module-queue-ts --out ./my-app

# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "module-queue-ts", variables);

# MCP — from an agent
get_template({ name: "module-queue-ts" })

Prerequisites

ToolVersionWhy
node>=22Node.js runtime for the queue module

Variables

Required

ProjectName string
Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.

Optional

Description string — defaults to Background job processing with pluggable queue providers
Short project description for package.json and README
QueueProvider string — defaults to memory
Default queue provider (memory, bullmq, sqs, or a custom name)

What it produces

23 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.

.env.example
.gitignore
biome.json
package.json
README.md
src/queue/__tests__/integration.test.ts
src/queue/__tests__/job.test.ts
src/queue/__tests__/memory.test.ts
src/queue/__tests__/registry.test.ts
src/queue/bootstrap.ts
src/queue/index.ts
src/queue/job.ts
src/queue/metrics.ts
src/queue/providers/bullmq.ts
src/queue/providers/index.ts
src/queue/providers/memory.ts
src/queue/providers/registry.ts
src/queue/providers/sqs.ts
src/queue/providers/types.ts
src/queue/types.ts
src/queue/worker.ts
tsconfig.json
vitest.config.ts

Composes with

Composites that use it

  • Background Processor — Async job processing service with queue, database, storage, observability, and deployment.
  • Enterprise AI Infrastructure — Full enterprise AI stack with agents, tool servers, safety guardrails, evaluation, prompt management, observability, and Kubernetes deployment..
  • Production API Service — Production-grade TypeScript API service with auth, database, caching, rate limiting, background jobs, observability, and deployment..