Skip to content

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

8Shards
0Pushed
0Processed
0Failed
0Workers
0Queues

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_MASK

Each 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
  1. Push - Job enters the queue in waiting state (or delayed if delay > 0)
  2. Pull - Worker pulls job, state becomes active
  3. Ack - Job completed successfully → completed
  4. Fail - Job failed, will retry or move to DLQ

Try These Scenarios

  1. High Throughput: Push 100 jobs with a running worker
  2. Priority Processing: Push jobs with different priorities (higher = sooner)
  3. Delayed Jobs: Add jobs with 5000ms delay, watch them become ready
  4. Failure Handling: Increase failure rate, observe retries and DLQ
  5. Queue Control: Pause a queue, push jobs, resume and watch processing

Differences from Real bunqueue

FeatureSimulatorReal bunqueue
StorageIn-memorySQLite
Shards8 (configurable)Auto-detected from CPU
WorkersSimulated delaysReal processing
PersistenceNone (page refresh resets)Full durability
TCP ServerN/AFull protocol

The simulator is designed for learning and demonstration purposes. For production workloads, use the real bunqueue server.