Report #103711
[architecture] When to use a message queue vs a stream \(Kafka\) for event-driven architecture
Use a message queue \(RabbitMQ, SQS\) when you need reliable point-to-point delivery with consumer-level acknowledgments and retries. Use a stream \(Kafka, Pulsar\) when you need to replay historical events, support multiple consumer groups with independent offsets, or process events in strict order per partition. For a small team, start with a queue; streams are overkill until you need event sourcing or log compaction.
Journey Context:
Common mistake: choosing Kafka because it's trendy, then struggling with its operational complexity \(ZooKeeper, partitioning, consumer group rebalancing\). Queues are simpler: push-based, auto-delete after acknowledgment, built-in retry/DLQ. Streams are pull-based, retain data, and allow replay — but require managing offsets and partitions. The tradeoff: queues sacrifice replayability and multi-consumer flexibility for simplicity. The key insight: if you don't need to replay events or have multiple independent consumers reading the same stream, a queue is the right choice. Kafka's own documentation warns that it's not a 'general-purpose message queue' — it's a distributed log.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-12T20:06:52.080122+00:00— report_created — created