Interactive Simulator
Interactive Simulator
Experience bunqueue’s features directly in your browser. This simulator implements the core queue functionality including:
- Sharding - See how jobs are distributed across shards using FNV-1a hash
- Priority Queue - Jobs with higher priority are processed first
- Delayed Jobs - Schedule jobs to run after a delay
- Workers - Start concurrent workers to process jobs
- DLQ (Dead Letter Queue) - Failed jobs after max retries go to DLQ
- Queue Control - Pause, resume, and drain queues
bunqueue Interactive Simulator
Real-time visualization of queue operations, sharding, and job lifecycle
Controls
10
3
Shards (0)
Waiting Delayed Active Completed Failed
Queues
No queues yet. Push some jobs!
Workers
No workers running. Start one!
Events (Last 50)
How It Works
Sharding
The simulator uses the same FNV-1a hash algorithm as bunqueue to distribute queues across shards:
shardIndex = fnv1aHash(queueName) & SHARD_MASKEach queue maps to exactly one shard, and all jobs in that queue share the same shard.
Job Lifecycle
PUSH → waiting/delayed → PULL → active → ACK/FAIL → completed/retry/DLQ- Push - Job enters the queue in
waitingstate (ordelayedif delay > 0) - Pull - Worker pulls job, state becomes
active - Ack - Job completed successfully →
completed - Fail - Job failed, will retry or move to DLQ
Try These Scenarios
- High Throughput: Push 100 jobs with a running worker
- Priority Processing: Push jobs with different priorities (higher = sooner)
- Delayed Jobs: Add jobs with 5000ms delay, watch them become ready
- Failure Handling: Increase failure rate, observe retries and DLQ
- Queue Control: Pause a queue, push jobs, resume and watch processing
Differences from Real bunqueue
| Feature | Simulator | Real bunqueue |
|---|---|---|
| Storage | In-memory | SQLite |
| Shards | 8 (configurable) | Auto-detected from CPU |
| Workers | Simulated delays | Real processing |
| Persistence | None (page refresh resets) | Full durability |
| TCP Server | N/A | Full protocol |
The simulator is designed for learning and demonstration purposes. For production workloads, use the real bunqueue server.