Round-robin load balancing distributes producer messages across available Kafka partitions in a repeating cycle. It ignores message keys, sends records one by one, and returns to the first partition after reaching the last. The result is an approximately even data distribution when message ordering is not the primary requirement. section 3.2.1 section 3.2.6
Use the strategy when the architectural priority is balanced distribution rather than key-based sequencing:
- Choose round-robin when message order is not important and processing parallelism or balanced partition load matters. section 3.2.6
- Do not rely on it for per-key ordering or co-location, because keys are ignored and related records may reach different partitions. section 3.2.1
- Prefer key-based partitioning when messages sharing a key must remain in sequence on one partition. section 3.2.1 section 3.2.6
Cyclical assignment
With three available partitions, successive records follow a repeating pattern such as partition 0, partition 1, partition 2, partition 0, and so on. Each partition therefore receives approximately the same amount of data, provided the available partitions remain unchanged. section 3.2.1
partition.class=org.apache.kafka.clients.producer.RoundRobinPartitioner
Inspect the producer partitioner configuration for the RoundRobinPartitioner class. section 3.2.1


