Day 98: Lab: Kafka vs RabbitMQ
Choosing between them, with real hands-on comparison
- RabbitMQ — great for complex routing logic, per-message acknowledgment/retry semantics, task-queue-style workloads
- Kafka — great for very high throughput, event replay/reprocessing, and multiple independent consumers of the same event stream (event sourcing, analytics pipelines)
Lab: run both, send the same event through each
Stand up both RabbitMQ and Kafka locally (Docker Compose). Publish the same "order created" event through each. In RabbitMQ, watch it land in exactly one queue and disappear once acknowledged. In Kafka, watch two independent consumer groups both read the same message from the topic — and then replay it by resetting a consumer group's offset back to the beginning.
kafka-consumer-groups.sh --bootstrap-server localhost:9092 \
--group my-group --topic orders --reset-offsets --to-earliest --executeThe one experience that makes the difference click
Replaying a Kafka topic from the beginning while RabbitMQ has no equivalent (a consumed, acknowledged message is simply gone) is usually the single moment this distinction stops being abstract trivia and becomes an intuition you actually have.
Phase 16 complete — you should now be able to
An analytics team wants to reprocess 3 months of historical "page view" events with a new aggregation logic. Which system natively supports this?