Why this matters
- VaultCommerce keys by orderId so payment, ship, and cancel events for one order stay ordered.
- Null keys round-robin across partitions — fine for metrics, wrong for order lifecycle.
- Custom partitioners are rare; get the key right first.
- Hot keys create partition imbalance — monitor per-partition byte rate.
orderId=42key
Partition 1All events for order 42
Default partitioner behavior
Kafka 3.x uses sticky partitioning for null keys (batch to one partition until batch fills) and murmur2 hash for non-null keys. VaultCommerce never sets a custom partitioner — orderId string keys distribute well across 12 partitions for their SKU mix.
Key points
- Partition key — business identifier hashed to partition index
- Sticky partitioner — batches null-key records to reduce partition spread
- Hot partition — skewed key distribution overloads one broker
- Ordering scope — guaranteed only among records sharing a key
- Partition count — fixed at topic creation; affects hash distribution
The rest of this guide is part of Pro
Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.
Still to come · 2 sections
- Explicit partition override
- VaultCommerce rollout checklist
Test yourself
Answer these before moving on — recall is what makes it stick.