Kafkaは従来のメッセージキュー(RabbitMQなど)と主な点で異なります。Kafkaは分散ログであり、イベントを保持し(消費時に削除するのではなく)、リプレイをサポートし、非常に高いスループットを提供し、プルベース、パーティションベースのモデルを使用します。これらの違いを理解することで、それぞれをいつ使用するかが明確になります。
主な違い
TRADITIONAL QUEUE (e.g. RabbitMQ) → messages are typically DELETED once consumed:
→ a message goes to a consumer and is removed (transient)
→ push-based often; rich routing; per-message acknowledgment
KAFKA → a durable, retained LOG of events:
→ events are STORED (retained for a period), NOT deleted on consumption
→ multiple consumers/groups can read the SAME events independently
→ REPLAY → re-read past events (rewind to any offset)
→ pull-based; partition-based ordering and scaling; very high throughput
