Dheeraj Panangat
01/10/2025, 6:32 PMPedro Mázala
01/13/2025, 2:44 PMcommit 2b6e239a7867d28d7eaa2467066b400cb0671737
Author: Pedro Mázala <pedroh.mazala@gmail.com>
Date: Mon Jul 24 12:43:09 2023 +0200
Ensure `kafka-clients` version matches Flink (#220)
Flink had issues in the past about not being able to commit offsets (1)
and the community implemented a fix on version `1.16.0`.
Part of this fix is about `org.apache.kafka:kafka-clients` version. It
got updated from version `2.8.1` to `3.1.1` (2).
You may think updating Flink should be enough (and it should indeed),
but the project has another dependency
`org.apache.flink:flink-avro-confluent-registry` which relies on
`kafka-clients`. This package from confluent uses the version
`6.2.2-css` which is a confluent centric version. Because `6` is
greather than `3`, gradle thinks that if both versions are compatible,
the code should rely on the latest one. But, unfortunately, this version
relies on `kafka-clients:2.8.0` (3).
Those changes make sure the dependencies from apicurio and confluent on
`kafka-clients` is excluded and then only the dependency from Flink
itself is used.
All this was found using `./gradlew dependencies` and some googling to
discovery what is `kafka-clients:6.2.2-css` (4).
(1) https://issues.apache.org/jira/browse/FLINK-28060
(2) https://github.com/apache/flink/pull/19994/files#diff-c8e72f4cdf371f8b16a87a6445ff41807a1bb2d1d061245de75d33f1388592d0
(3) https://github.com/confluentinc/kafka/blob/v6.2.2-22-ccs/Jenkinsfile#L53
(4) https://stackoverflow.com/questions/70838735/determine-actual-kafka-version-that-is-being-used-inside-confluentinc-cp-kafka6