Kafka ทรงพลังแต่มี กับดักที่พบบ่อย — ความเข้าใจผิดและข้อผิดพลาดเกี่ยวกับ partitioning, ordering, พฤติกรรมของ consumer, delivery semantics และการ operate การเข้าใจสิ่งเหล่านี้ช่วยหลีกเลี่ยงปัญหาและใช้ Kafka ได้อย่างถูกต้อง
กับดักด้านการออกแบบและ partitioning
✗ Too FEW partitions → limits consumer parallelism (can't scale consumption beyond
partition count); too MANY → overhead, rebalancing pain → plan partition count carefully
✗ Wrong PARTITION KEY → uneven distribution (hot partitions) or wrong ordering scope →
choose a key for even distribution AND the ordering you need
✗ Expecting GLOBAL ordering → Kafka only orders WITHIN a partition (a common misunderstanding)
✗ Adding partitions changes key→partition mapping → breaks ordering for keys (be careful)
