Kafka ایک partition کے اندر ترتیب کی ضمانت دیتا ہے لیکن partitions کے پار نہیں — یہ ایک اہم تصور ہے۔ متعلقہ events کے لیے ترتیب حاصل کرنے کے لیے، آپ انہیں ایک ہی partition میں بھیجتے ہیں (ایک ہی key کے ذریعے)۔ ترتیب کو سمجھنا درستگی کے لیے اہم ہے۔
فی partition ترتیب
Kafka guarantees:
✓ ORDER WITHIN a partition → events in a partition are strictly ordered (by offset);
consumers read them in order
✗ NO order ACROSS partitions → events in different partitions have no relative order
guarantee (they're processed in parallel by different consumers)
→ this is a FUNDAMENTAL Kafka property (and a common source of misunderstanding)
