Partitioning strategy ఎంచుకోవడం — ఈవెంట్లు topic యొక్క partitions అంతటా ఎలా పంపిణీ చేయబడతాయి — ఇది ముఖ్యమైన Kafka డిజైన్ నిర్ణయం, ఇది ordering, parallelism, మరియు load distribution ను ప్రభావితం చేస్తుంది. Partition key మరియు count శ్రద్ధగా ఎంచుకోవాలి.
Partitioning ఎలా పనిచేస్తుంది
A producer's message goes to a partition based on:
→ with a KEY → hash(key) → determines the partition (same key → same partition consistently)
→ no key → distributed (round-robin / sticky) across partitions
→ the KEY choice determines ordering and distribution
