Examples
A curated collection of runnable examples demonstrating every major glide-mq feature. Each example is self-contained with its own package.json and can be started with npm install && npm start.
All examples require Valkey or Redis on localhost:6379 unless noted otherwise.
Basics
Fundamental queue and worker patterns, real-world use cases, and production-grade reliability features.
| Example | Description |
|---|---|
| core-basics | Queue, Worker, events, delayed/priority/retry jobs, bulk insert, graceful shutdown |
| core-advanced | Compression, rate limiting, deduplication, dead letter queues, schedulers |
| email-service | Production email delivery with DLQ, exponential backoff, priority, rate limiting |
| webhook-delivery | Reliable webhook delivery with fan-out, deduplication, per-endpoint rate limiting |
| image-pipeline | FlowProducer image processing pipeline with multi-variant progress tracking |
| stall-detection | Detecting and recovering stalled jobs for both stream and list-sourced workers |
Scheduling
Cron patterns, fixed intervals, bounded schedulers, and repeat-after-complete.
| Example | Description |
|---|---|
| cron-scheduler | Cron patterns, fixed intervals, timezones, startDate, scheduler inspection |
| bounded-schedulers | Schedulers with execution limits and end dates |
| repeat-after-complete | Schedule the next run only after the current one finishes |
View all scheduling examples →
Workflows
Parent-child flows, DAG dependencies, step jobs, and waiting-children patterns.
| Example | Description |
|---|---|
| core-workflows | FlowProducer trees, chain() pipelines, group() fan-out |
| dag-workflows | Arbitrary DAG dependencies with diamond patterns and cycle detection |
| step-job-move-to-delayed | Multi-step resumable state machines using moveToDelayed |
| move-to-waiting-children | Parent job suspends until all child jobs complete |
Broadcast
Fan-out pub/sub messaging with subject-based filtering.
| Example | Description |
|---|---|
| broadcast | Fan-out delivery to multiple independent subscribers |
| broadcast-subjects | Subject-based filtering with wildcard patterns |
| subject-filter | NATS-style topic routing with * and > wildcards |
Framework Integrations
Integrate glide-mq with popular Node.js web frameworks.
| Example | Description |
|---|---|
| hono-basic | Minimal Hono integration with glide-mq directly |
| hono-api | Full REST API + SSE using @glidemq/hono |
| fastify-api | Full REST API + SSE using @glidemq/fastify |
| hapi-basic | Basic Hapi.js server with glide-mq directly |
| hapi-api | Full REST API + SSE using @glidemq/hapi |
| nestjs-module | Comprehensive @glidemq/nestjs with decorators, DI, and flow producers |
| express-basic | Express queue management API with glide-mq directly |
| express-dashboard | Web UI dashboard using @glidemq/dashboard |
| koa-basic | Koa queue management API with glide-mq directly |
| nextjs-api-routes | Next.js producer-only pattern with separate worker process |
Serverless & Infrastructure
Serverless producers, IAM authentication, HTTP proxy, and cluster mode.
| Example | Description |
|---|---|
| serverless-producer | Lightweight Producer and ServerlessPool for Lambda/Edge |
| iam-auth | AWS IAM authentication for ElastiCache and MemoryDB |
| http-proxy | Cross-language job enqueuing via HTTP proxy |
| valkey-cluster | Running glide-mq on a Valkey/Redis cluster |
View all serverless examples →
Advanced Patterns
High-throughput tuning, batch processing, LIFO mode, custom serializers, and more.
| Example | Description |
|---|---|
| high-throughput | Skip server-side events/metrics for maximum throughput |
| batch-processing | Process multiple jobs in a single processor invocation |
| lifo-mode | Last-in-first-out job processing with priority precedence |
| custom-job-ids | Idempotent enqueuing with deterministic job IDs |
| pluggable-serializers | Custom serializers for job data encoding |
| exclude-data | List jobs without payloads for lightweight dashboards |
| request-reply | Synchronous RPC over glide-mq using addAndWait |
| otel-tracing | OpenTelemetry tracing integration |
| testing | In-memory testing with TestQueue and TestWorker |