[ https://issues.apache.org/jira/browse/KAFKA-13880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guozhang Wang resolved KAFKA-13880. ----------------------------------- Fix Version/s: 3.3.0 Assignee: Guozhang Wang Resolution: Fixed > DefaultStreamPartitioner may get "stuck" to one partition for unkeyed messages > ------------------------------------------------------------------------------ > > Key: KAFKA-13880 > URL: https://issues.apache.org/jira/browse/KAFKA-13880 > Project: Kafka > Issue Type: Bug > Components: streams > Affects Versions: 2.4.0 > Reporter: Artem Livshits > Assignee: Guozhang Wang > Priority: Major > Fix For: 3.3.0 > > > While working on KIP-794, I noticed that DefaultStreamPartitioner does not > call .onNewBatch. The "sticky" DefaultStreamPartitioner introduced as a > result of https://issues.apache.org/jira/browse/KAFKA-8601 requires > .onNewBatch call in order to switch to a new partitions for unkeyed messages, > just calling .partition would return the same "sticky" partition chosen > during the first call to .partition. The partition doesn't change even if > the partition leader is unavailable. > Ideally, for unkeyed messages the DefaultStreamPartitioner should take > advantage of the new built-in partitioning logic introduced in > [https://github.com/apache/kafka/pull/12049.] Perhaps, it could return null > partition for unkeyed message, so that KafkaProducer could run built-in > partitioning logic. -- This message was sent by Atlassian Jira (v8.20.7#820007)