zoe icon indicating copy to clipboard operation
zoe copied to clipboard

io.confluent.kafka.serializers.protobuf.KafkaProtobufDeserializer not found?

Open haraldkubota opened this issue 3 years ago • 3 comments

I might have done something wrong, but I get an error:

❯ zoe --cluster mealcluster topics consume meal
2021-05-04 18:32:45 INFO zoe: loading config from url : file:/home/harald/.zoe/config/default.yml
2021-05-04 18:32:46 INFO zoe: querying offsets for topic: meal
failure: runner 'local' failed
cause:
  failure: Invalid value io.confluent.kafka.serializers.protobuf.KafkaProtobufDeserializer for configuration value.deserializer: Class io.confluent.kafka.serializers.protobuf.KafkaProtobufDeserializer could not be found.

with this config file:

clusters:
  mealcluster:
    props:
      bootstrap.servers: "t620.lan:9092"
      key.deserializer: "org.apache.kafka.common.serialization.StringDeserializer"
      value.deserializer: "io.confluent.kafka.serializers.protobuf.KafkaProtobufDeserializer"
      key.serializer: "org.apache.kafka.common.serialization.StringSerializer"
      value.serializer: "org.apache.kafka.common.serialization.ByteArraySerializer"
    registry: ${SCHEMA_REGISTRY:-http://t620.lan:8081}

runners:
  default: "local"

Using io.confluent.kafka.serializers.KafkaAvroDeserializer worked perfectly fine. if it helps:

❯ zoe version print
{"projectVersion":"0.27.0","buildTimestamp":"2021-04-16T19:24:49.936261","createdBy":"Gradle 6.4","buildJdk":"14.0.2 (Azul Systems, Inc. 14.0.2+12)","buildOS":"Linux amd64 5.4.0-1043-azure"}

haraldkubota avatar May 04 '21 09:05 haraldkubota

zoe-service/src/service.kt has references to the Avro serializer and the string serializer, but nowhere does it mention the ProtoBuf serializer/deserializer, so I guess there's no support for it yet.

That certainly explains my problem. Unfortunately I barely know Kafka nor Kotlin, so I won't be able to fix it myself.

haraldkubota avatar May 04 '21 11:05 haraldkubota

Hi @haraldkubota . Indeed zoe is missing the libraries for protobuf as of now. I can make a PR to fix this this evening or tomorrow.

wlezzar avatar May 04 '21 18:05 wlezzar

That would be awesome! I would not know where to start.

haraldkubota avatar May 05 '21 06:05 haraldkubota