Kafka garantit le tri au sein d'une partition mais pas entre les partitions — un concept crucial. Pour obtenir le tri des événements associés, vous les routez vers la même partition (via la même clé). Comprendre le tri est important pour la correction.
Tri par 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)
