Claus Ibsen created CAMEL-27551:
-----------------------------------
Summary: camel-kafka - Use the Kafka default for partitionAssignor
Key: CAMEL-27551
URL: https://issues.apache.org/jira/browse/CAMEL-27551
Project: Camel
Issue Type: Improvement
Components: camel-kafka
Reporter: Claus Ibsen
Fix For: 4.24.0
The camel-kafka consumer option partitionAssignor defaults to
org.apache.kafka.clients.consumer.RangeAssignor, and Camel always passes it to
the Kafka consumer as partition.assignment.strategy. The Kafka client default
is [RangeAssignor, CooperativeStickyAssignor] (since Kafka 3.0, KIP-726): it
still uses the RangeAssignor, but a group can then move to cooperative
rebalancing with a single rolling restart that removes RangeAssignor from the
list. With the Camel default, users must first add CooperativeStickyAssignor to
every member themselves, which takes an extra rolling restart.
Proposal: align with the Kafka default by no longer setting
partition.assignment.strategy unless the user configures partitionAssignor, and
document the Kafka default in the option.
Things to check:
* The assignment does not change: members with [RangeAssignor,
CooperativeStickyAssignor] and members of an older Camel version with
[RangeAssignor] in the same group still agree on RangeAssignor, so a rolling
upgrade is safe.
* The consumer rebalance listener and commit-on-revoke logic in camel-kafka
must handle incremental revocation (onPartitionsRevoked with only some
partitions, onPartitionsLost) once a user switches to cooperative rebalancing.
* The option is not used when groupProtocol=consumer (KIP-848), so nothing
changes there.
* This changes a default, so it needs an entry in the 4.24 upgrade guide.
Found while aligning the option descriptions with the Kafka documentation in
CAMEL-27549.
_Claude Code on behalf of Claus Ibsen_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)