Confluent Kafka Avro Serializer, Server Project Code Dependency? VerifiableProperties?

1.3k views Asked by At

If I use the Maven dependency (SBT format):

"io.confluent" % "kafka-avro-serializer" % "3.1.1"

I will always get the warning:

[warn] Class kafka.utils.VerifiableProperties not found - continuing with a stub.

and if I write code that calls AbstractKafkaAvroDeserializer::deserializerConfig(Map<String, ?> props), I get a compiler error because this is overloaded with AbstractKafkaAvroDeserializer::deserializerConfig(VerifiableProperties props) and even though I'm not using the second variant, I get compilation errors anyway.

The kafka-avro-serializer project declares a Maven dependency on the core Kafka server library with "provided" scope:

    <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka_${kafka.scala.version}</artifactId>
        <version>${kafka.version}</version>
        <scope>provided</scope>
    </dependency>

I can fix the compilation issues, both the warning and the error, by adding the Maven dependency (SBT notation):

  "org.apache.kafka" %% "kafka" % "0.10.1.1" % "provided",

This seems like a bug in the kafka-avro-serializer project. That project shouldn't depend on the Kafka server code, even with provided scope. I'm writing a Kafka Streams app that runs standalone and wants to work with Avro encoded messages. This streams app shouldn't have a dependency, even with provided scope, to the Kafka server code base.

0

There are 0 answers