Partitioning strategy — ஒரு topic-இன் partitions முழுவதும் events எப்படி விநியோகிக்கப்படுகின்றன — என்பது ordering, parallelism, மற்றும் load distribution பாதிக்கும் ஒரு முக்கியமான Kafka design முடிவு. 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
