Skip to main content

Message Queue Simulator

Visualize how message queues work across Kafka and RabbitMQ patterns. Explore producers, brokers, topics, partitions, exchanges, queues, consumer groups, lag, rebalancing, backpressure, ordering, and dead letter queues.

Category: Infrastructure

What You Will Learn

  • How producers, brokers, and consumers interact
  • How Kafka partitions and consumer groups affect lag and ordering
  • How RabbitMQ exchanges and queue bindings route messages
  • How dead letter queues protect systems from poison messages

Topics covered: message-queue, kafka, rabbitmq, queues, streaming, backend, infrastructure, distributed-systems, educational, interactive

// simulator

Message Queue Simulator

Visualize how message queues work across Kafka and RabbitMQ patterns. Explore producers, brokers, topics, partitions, exchanges, queues, consumer groups, lag, rebalancing, backpressure, ordering, and dead letter queues.

Supported byDigitalOceanDevDojoSMTPfastQuizAPIBecome a sponsor

// message queue lab

Message Queue Simulator

Visualize producers, brokers, partitions, queues, consumer groups, lag, rebalancing, backpressure, and dead letter handling across Kafka and RabbitMQ style systems.

Append-only partitions retain messages by offset.

Live Message Flow

Producers

6/tick

m-012orders
m-011billing
m-010email

Kafka topic

Topic log

partition-0
2 pending

key: orders / owner: consumer-1

partition-1
3 pending

key: billing / owner: consumer-2

partition-2
4 pending

key: email / owner: consumer-1

Consumers

2 active

consumer-1
offset commit
consumer-2
offset commit

DLQ

0 failed

No poison messages yet.

Produced

12

Processed

3

Lag

9

DLQ

0

Partition Ownership

Partition 0

offset 1, key orders

consumer-1

Partition 1

offset 2, key billing

consumer-2

Partition 2

offset 3, key email

consumer-1
Event Log

01 | producer published 12 messages

00 | consumer group started with 2 consumers

Controls
Consumer lag75%

// selected scenario

Normal operation

A balanced queue keeps lag low because consumer capacity roughly matches producer throughput.

Delivery Guarantees
At most once

Ack before work; fast but messages can disappear.

At least once

Ack after work; safe but handlers must be idempotent.

Exactly once

Requires broker and consumer coordination, not just a retry loop.

System Health

healthy

Throughput 6/tick, capacity 6/tick, backlog 9

Consumers commit offsets after processing for at-least-once delivery.

Consumer groups share partitions. One partition is read by one consumer in a group.

Kafka mental model
  • Topics are append-only logs split into partitions.
  • Offsets are the consumer group checkpoint.
  • Scaling is limited by partition count per consumer group.
  • Ordering is reliable only inside a partition.
RabbitMQ mental model
  • Exchanges route messages into queues through bindings.
  • Messages leave a queue when they are acknowledged.
  • Prefetch and ack mode control backpressure.
  • DLX policies route rejected or expired messages to dead letter queues.

About this message queue simulator

What you'll learn

  • How producers send messages through a broker to consumers
  • How Kafka partitions and consumer groups create parallelism
  • How RabbitMQ exchanges, bindings, queues, and acknowledgments fit together
  • Why lag, backpressure, and rebalancing matter during production incidents
  • How poison messages move into a dead letter queue for later inspection

Concepts covered

  • Kafka: topics, partitions, offsets, consumer groups, ordering, and at-least-once delivery
  • RabbitMQ: exchanges, queues, bindings, prefetch, acknowledgments, retries, and DLX policies
  • Operations: lag monitoring, rebalancing, poison message handling, and backpressure response

Browser-safe by design

This simulator does not run Kafka or RabbitMQ. It models the queue mechanics in the browser so you can see cause and effect before operating a real broker in production.

The production lesson

Message queues decouple systems, but they do not remove failure. You still need idempotent consumers, lag alerts, retry limits, dead letter handling, and a clear ownership model for messages that cannot be processed.

Try next

Sponsored
Carbon Ads
$ cd /games
// share