Partitioning strategy को छनोट गर्ने — कसरी events लाई topic को partitions मा distribute गरिन्छ — 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
