Skip to content
Get started
Get started
bunqueue Glossary: Job Queue, Workflow & MCP Terms
View Markdown
reference · glossary

Every bunqueue term, defined.

Plain-English definitions linking directly to the guide that covers each concept in depth.

Mental Model Map

How core bunqueue terms—Queue, Job, Lease, Shard, DLQ, Saga—connect together

Queue & Job priority · delay · group Worker & Lease lock token · heartbeat execution DLQ & Fencing at-least-once safety Flow & Saga DAGs · compensation reliability Core Terms bunqueue Glossary Every term links straight to the guide where it is used in practice
Quick vocabulary: read this page whenever you encounter a queue or distributed-systems term in the guides.
TermMeaningGuide
JobUnit of work (name, JSON payload, options) moving through waiting, prioritized, delayed, waiting-children, active, completed, and failed.Queue API
QueueNamed job collection (e.g. emails) with independent pause, drain, rate limit, and concurrency controls.Queue API
Producer & WorkerA producer enqueues jobs via queue.add(); a worker pulls jobs and runs your handler with configurable concurrency.Worker API
Embedded vs Server modeEmbedded runs inside Bun (memory or SQLite). Server runs a standalone TCP/HTTP broker for multi-service/polyglot SDKs (SQLite single broker or PostgreSQL 17-19 fleet).Server Mode
Ack & Lease (lock)A lease grants heartbeat-renewed ownership of an active job; an ack confirms completion (automatic on resolve). Expired leases requeue the job and fence stale ACKs.Production Readiness
Simple modeBunqueue class combining Queue, Worker, named routes, and middleware in one object.Simple Mode
TermMeaningGuide
Retry & BackoffRe-runs failed jobs up to attempts tries (default 3), spaced by jittered exponential (default) or fixed backoff.Errors & Retries
DLQ (Dead Letter Queue)Holds jobs that exhausted retries, preserving errors and history for inspection or replay.Dead Letter Queue
Stall detection & HeartbeatWorkers send periodic heartbeats; if they stop (crash or blocked loop), stall detection reclaims and requeues the job.Heartbeats, Locks & Stalls
Durable writedurable: true bypasses SQLite’s ~10 ms write buffer before add() resolves. PostgreSQL admissions are always transactional.Production Readiness
Deduplication & IdempotencyCustom jobId suppresses unfinished duplicates (before completion/DLQ). Because delivery is at-least-once, external side effects still need app idempotency keys.Custom-ID limits
TermMeaningGuide
Priority, Delay, Promote & CronHigher priority runs first; delayed jobs wait until due time (promote moves them to waiting immediately); cron schedules recurring jobs via cron expressions or fixed intervals with timezones.Cron & Schedulers
Concurrency & Rate limitingConcurrency caps parallel active jobs per worker or queue; rate limiting caps throughput per time window to protect downstream APIs.Rate Limiting
Flow (FlowProducer)Parent-child job DAGs where child jobs complete before their parent becomes runnable.Flow Producer
Queue group & WebhooksA queue group namespaces related queues (e.g. per tenant). Webhooks send HMAC-SHA256 signed HTTP POST notifications on job events.Job Groups, Webhooks
Pause, Drain & ObliteratePause stops new deliveries while active jobs finish; drain deletes waiting/delayed jobs; obliterate deletes the queue and all its data.Inspect & Control
TermMeaningGuide
Workflow & ExecutionA workflow defines a durable multi-step process (branching, parallel steps, retries, sleep). Each run creates a checkpointed execution that resumes after crashes without repeating finished steps.Workflow Engine
Saga compensationOptional undo handler (compensate) on a step; if a later step fails, prior completed steps compensate automatically in reverse order.Rollback (Saga)
Signal & Human approvalDurable pause point (waitFor) resumed with a payload via engine.signal(), bunqueue top, or MCP signal_workflow.Human Approval
TermMeaningGuide
MCP Server (bunqueue-mcp)Bundled Model Context Protocol server exposing queues, jobs, DLQs, crons, monitoring, and optional workflow controls to AI assistants (Claude, Cursor, Windsurf) over stdio or Streamable HTTP.MCP Server
Toolsets & Dynamic discoveryLogical MCP tool groups (queues, jobs, dlq, cron, monitoring, workflows, etc.). BUNQUEUE_MCP_TOOLSETS=dynamic (or BUNQUEUE_MCP_PROFILE=agent) keeps the initial footprint small and loads toolsets on demand.MCP Toolsets
Confirmation guard & Decision modelBUNQUEUE_MCP_CONFIRM=destructive requires explicit confirmation before destructive actions (drain, clean, obliterate, DLQ purge), optionally assisted by a lightweight intent classifier.Confirmation Guard
TermMeaningGuide
ShardingAutomatic in-memory partitioning in SQLite/memory mode that reduces lock contention across queues.Architecture
WAL (Write-Ahead Logging)SQLite journal mode enabling concurrent reads and writes via -wal and -shm sidecar files.Storage Backends
MessagePackCompact binary wire framing used over bunqueue TCP (:6789).TCP Protocol
Store-and-forwardBuffering jobs in a local embedded SQLite spool on an edge host and draining to a central broker with queue.forward().IoT & Edge