Blazing Fast
Built on Bun’s native SQLite with WAL mode. Optimized data structures deliver sub-millisecond latency at scale.
import { Queue, Worker } from 'bunqueue/client';
// Create a queueconst queue = new Queue('emails', { embedded: true });
// Add jobsawait queue.add('welcome', { to: 'user@example.com', template: 'welcome'});
// Process jobsconst worker = new Worker('emails', async (job) => { await sendEmail(job.data); return { sent: true };}, { embedded: true });
worker.on('completed', (job) => console.log(`✓ ${job.id}`));# First, start the serverbunqueue start --data-path ./data/queue.db// Then, in your applicationimport { Queue, Worker } from 'bunqueue/client';
// Create a queue (connects to localhost:6789)const queue = new Queue('emails');
// Add jobsawait queue.add('welcome', { to: 'user@example.com', template: 'welcome'});
// Process jobsconst worker = new Worker('emails', async (job) => { await sendEmail(job.data); return { sent: true };});
worker.on('completed', (job) => console.log(`✓ ${job.id}`));FROM oven/bun:latestWORKDIR /appRUN bun add bunqueueCOPY . .CMD ["bunqueue", "start"]docker run -p 6789:6789 -p 6790:6790 \ -v ./data:/app/data \ -e DATA_PATH=/app/data/queue.db \ bunqueueBlazing Fast
Built on Bun’s native SQLite with WAL mode. Optimized data structures deliver sub-millisecond latency at scale.
Zero Dependencies
No Redis, no external services. Just Bun and SQLite. Deploy anywhere in seconds.
Production Ready
Stall detection, dead letter queues, automatic retries, rate limiting, and S3 backups built-in.
BullMQ Compatible
Familiar API for easy migration. Drop-in replacement for most BullMQ use cases.
bunqueue offers two deployment modes to fit your architecture. Choose based on your use case.
Embedded Mode
Run bunqueue directly inside your application process. Zero network overhead, instant setup.
Best for:
TCP Server Mode
Run bunqueue as a standalone server. Multiple clients connect via TCP protocol.
Best for:
| Aspect | Embedded | TCP Server |
|---|---|---|
| Setup | Zero config | Run bunqueue start |
| Network | None (in-process) | TCP :6789 / HTTP :6790 |
| Option | embedded: true | Default (no option) |
| Persistence | DATA_PATH env var | --data-path flag |
| Scaling | Single process | Multiple clients |
| Latency | Lowest (~μs) | Low (~ms) |
import { Queue, Worker } from 'bunqueue/client';
// Both Queue and Worker must have embedded: trueconst queue = new Queue('tasks', { embedded: true });
const worker = new Worker('tasks', async (job) => { return await processJob(job.data);}, { embedded: true });# Terminal 1: Start the serverbunqueue start --data-path ./data/queue.db// Terminal 2: Your application connects to the serverimport { Queue, Worker } from 'bunqueue/client';
// No embedded option = connects to localhost:6789const queue = new Queue('tasks');const worker = new Worker('tasks', async (job) => { return await processJob(job.data);});Measured on Mac Studio M1 Max, 32GB RAM. Run bun run bench for your hardware.
50-150K ops/sec
Push throughput with batch operations
< 1ms p99
Sub-millisecond latency
~50MB base
Minimal memory footprint
< 100ms
Cold start time
Priority Queues
Process high-priority jobs first with configurable priority levels.
Delayed Jobs
Schedule jobs to run at a specific time or after a delay.
Retries & Backoff
Automatic retries with exponential backoff on failure.
Rate Limiting
Control job processing rate per queue or globally.
Stall Detection
Automatic recovery of jobs that become unresponsive.
Dead Letter Queue
Advanced DLQ with metadata, filtering, and auto-retry.
Cron Jobs
Schedule recurring jobs with cron expressions or intervals.
Parent-Child Flows
Create job hierarchies with dependencies.
Progress Tracking
Real-time progress updates and job logs.
Webhooks
HTTP callbacks for job events.
S3 Backup
Automated backups to any S3-compatible storage.
Prometheus Metrics
Built-in metrics endpoint for monitoring.