Kafka แตกต่างจาก message queue แบบดั้งเดิม (เช่น RabbitMQ) ในหลายด้านสำคัญ — มันเป็น distributed log ที่ เก็บรักษา event (แทนที่จะลบเมื่อมีการบริโภค), รองรับ replay, ให้ throughput ที่สูงมาก และใช้โมเดลแบบ pull-based ที่อิงกับ partition การเข้าใจความแตกต่างช่วยให้เห็นว่าเมื่อใดควรใช้แต่ละแบบ
ความแตกต่างสำคัญ
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
