You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "David G (Jira)" <ji...@apache.org> on 2021/10/07 09:59:00 UTC
[jira] [Created] (KAFKA-13359) Round Robin Kafka Producer Routes to
only half the partitions when even number of partitions
David G created KAFKA-13359:
-------------------------------
Summary: Round Robin Kafka Producer Routes to only half the partitions when even number of partitions
Key: KAFKA-13359
URL: https://issues.apache.org/jira/browse/KAFKA-13359
Project: Kafka
Issue Type: Bug
Components: producer
Affects Versions: 3.0.0, 2.7.0
Reporter: David G
When you have 1 message per batch, in the round robin Partitioner. The messages go only to half the partitions beacuse it always skips 1 partition. This works out for odd number of partitions because skipping 1 will mean all partitions get a hit eventually, but with an even number half the partitions never get selected.
So if you have partitions 1, 2, 3, 4
Message 1: Partion 1
Message 2: Partion 3
Message 3: Partion 1 ... so on. [ Here 2 and 4 are never selected]
If you have partitions 1, 2, 3
Message 1: Partion 1
Message 2: Partion 3
Message 3: Partion 2 .. so on
--
This message was sent by Atlassian Jira
(v8.3.4#803005)