Kafka vs SQS
High-throughput distributed log versus managed message queue for event streaming.
Overview
What is being compared
Apache Kafka is a distributed event log for high-throughput, ordered, replayable streams. SQS is a fully managed simple queue for point-to-point work distribution.
- Model — Distributed event log — Simple message queue
- Delivery — Any consumer group reads every message — Point-to-point, one consumer per message
- After consumption — Messages stay for the configured retention period — Messages are deleted
- Replay — Any consumer group can replay from any offset — Not possible
- Operations — You run it, or use MSK — Fully managed
How Kafka works
Producers append to a log. Each consumer group keeps its own offset, so several groups read the same messages independently and any of them can rewind.
How SQS works
Consumers compete for messages on one queue. A message is processed once, then deleted.
The same message, two exchanges
A Kafka consumer only moves its own offset forward; the message stays in the log. An SQS worker receives the message, which is hidden from other workers while it is processed, then deletes it.
> [!TIP] The log and the queue side by side, three services reading every order event, and the choice between the two play step by step in Visual Explanation below.
Sign up free to read the full topic
More Comparisons topics
Start free on Cariara · Coding problems · System design studio