Skip to content

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.

ExampleDescription
core-basicsQueue, Worker, events, delayed/priority/retry jobs, bulk insert, graceful shutdown
core-advancedCompression, rate limiting, deduplication, dead letter queues, schedulers
email-serviceProduction email delivery with DLQ, exponential backoff, priority, rate limiting
webhook-deliveryReliable webhook delivery with fan-out, deduplication, per-endpoint rate limiting
image-pipelineFlowProducer image processing pipeline with multi-variant progress tracking
stall-detectionDetecting and recovering stalled jobs for both stream and list-sourced workers

View all basics examples →

Scheduling

Cron patterns, fixed intervals, bounded schedulers, and repeat-after-complete.

ExampleDescription
cron-schedulerCron patterns, fixed intervals, timezones, startDate, scheduler inspection
bounded-schedulersSchedulers with execution limits and end dates
repeat-after-completeSchedule 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.

ExampleDescription
core-workflowsFlowProducer trees, chain() pipelines, group() fan-out
dag-workflowsArbitrary DAG dependencies with diamond patterns and cycle detection
step-job-move-to-delayedMulti-step resumable state machines using moveToDelayed
move-to-waiting-childrenParent job suspends until all child jobs complete

View all workflow examples →

Broadcast

Fan-out pub/sub messaging with subject-based filtering.

ExampleDescription
broadcastFan-out delivery to multiple independent subscribers
broadcast-subjectsSubject-based filtering with wildcard patterns
subject-filterNATS-style topic routing with * and > wildcards

View all broadcast examples →

Framework Integrations

Integrate glide-mq with popular Node.js web frameworks.

ExampleDescription
hono-basicMinimal Hono integration with glide-mq directly
hono-apiFull REST API + SSE using @glidemq/hono
fastify-apiFull REST API + SSE using @glidemq/fastify
hapi-basicBasic Hapi.js server with glide-mq directly
hapi-apiFull REST API + SSE using @glidemq/hapi
nestjs-moduleComprehensive @glidemq/nestjs with decorators, DI, and flow producers
express-basicExpress queue management API with glide-mq directly
express-dashboardWeb UI dashboard using @glidemq/dashboard
koa-basicKoa queue management API with glide-mq directly
nextjs-api-routesNext.js producer-only pattern with separate worker process

View all framework examples →

Serverless & Infrastructure

Serverless producers, IAM authentication, HTTP proxy, and cluster mode.

ExampleDescription
serverless-producerLightweight Producer and ServerlessPool for Lambda/Edge
iam-authAWS IAM authentication for ElastiCache and MemoryDB
http-proxyCross-language job enqueuing via HTTP proxy
valkey-clusterRunning glide-mq on a Valkey/Redis cluster

View all serverless examples →

Advanced Patterns

High-throughput tuning, batch processing, LIFO mode, custom serializers, and more.

ExampleDescription
high-throughputSkip server-side events/metrics for maximum throughput
batch-processingProcess multiple jobs in a single processor invocation
lifo-modeLast-in-first-out job processing with priority precedence
custom-job-idsIdempotent enqueuing with deterministic job IDs
pluggable-serializersCustom serializers for job data encoding
exclude-dataList jobs without payloads for lightweight dashboards
request-replySynchronous RPC over glide-mq using addAndWait
otel-tracingOpenTelemetry tracing integration
testingIn-memory testing with TestQueue and TestWorker

View all advanced examples →

Released under the Apache-2.0 License.