Claus Ibsen created CAMEL-27325:
-----------------------------------

             Summary: camel-kafka - the Confluent protobuf deserializer fails 
with Kafka 4.4.0: upgrade the Confluent serializers to 8.4.1
                 Key: CAMEL-27325
                 URL: https://issues.apache.org/jira/browse/CAMEL-27325
             Project: Camel
          Issue Type: Bug
          Components: camel-kafka
            Reporter: Claus Ibsen
             Fix For: 4.24.0


CAMEL-27273 upgraded {{kafka-version}} to 4.4.0. Kafka 4.4.0 moved 
{{org.apache.kafka.common.utils.ByteUtils}} to 
{{org.apache.kafka.common.utils.internals.ByteUtils}}. Camel still manages 
{{confluent-serializer-version}} 8.3.3, whose 
{{io.confluent.kafka.serializers.schema.id.SchemaId$SchemaMessageIndexes}} 
(kafka-schema-serializer) uses the old class. So every record read with the 
Confluent {{KafkaProtobufDeserializer}} fails:

{noformat}
java.lang.NoClassDefFoundError: org/apache/kafka/common/utils/ByteUtils
        at 
io.confluent.kafka.serializers.schema.id.SchemaId$SchemaMessageIndexes.readFrom(SchemaId.java:221)
        at 
io.confluent.kafka.serializers.schema.id.SchemaId.setMessageIndexes(SchemaId.java:152)
        at 
io.confluent.kafka.serializers.schema.id.SchemaId.fromBytes(SchemaId.java:73)
        at 
io.confluent.kafka.serializers.schema.id.DualSchemaIdDeserializer.deserialize(DualSchemaIdDeserializer.java:47)
        at 
io.confluent.kafka.serializers.protobuf.AbstractKafkaProtobufDeserializer.deserialize(AbstractKafkaProtobufDeserializer.java:174)
        ...
        at 
org.apache.camel.component.kafka.KafkaFetchRecords.startPolling(KafkaFetchRecords.java:388)
{noformat}

With CAMEL-27298 the consumer logs this and terminates. Only protobuf reads 
message indexes, so the Confluent Avro and JSON Schema deserializers are not 
affected. Found with the Citrus tests of the Kafka Kamelets on the 
4.24.0-SNAPSHOT of 2026-11-20 (apache/camel-kamelets#3295): the Confluent 
protobuf tests fail, the Apicurio protobuf test passes.

Confluent 8.4.1 (released 2026-11-19) has the same class with 
{{org.apache.kafka.common.utils.internals.ByteUtils}}, so it matches Kafka 
4.4.0.

Expected: {{confluent-serializer-version}} 8.4.1 (and the other Confluent 
versions that go with it), so that the managed Kafka and Confluent versions 
work together.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to