# Queues vs Pub/Sub — System Design

Source: https://www.geekswithgeeks.com/en/system-design/sd-messaging-patterns

> Point-to-point work distribution vs broadcast to many subscribers.

## Point-to-point vs broadcast

A **queue** delivers each message to exactly one consumer in a pool — great for distributing work. **Pub/Sub** delivers each message to every subscriber of a topic — great for fanning an event out to many independent listeners.

## Kafka vs RabbitMQ at a glance

**RabbitMQ** is a traditional broker: smart routing, per-message acknowledgment, messages removed once consumed. **Kafka** is a distributed log: messages are retained for a configured time, consumers track their own offset and can replay history — better for huge throughput and multiple independent consumer groups reading the same stream.

## Pick by replay need

If you need to reprocess history (rebuild a cache, backfill analytics), reach for Kafka's log model. If you need flexible routing and simple task queues, RabbitMQ is often less operational overhead.
