Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to avro encode a kafka message key


How to avro encode a kafka message key

New Contributor

I'm trying to produce messages to a kafka topic using the PublishKafkaRecord_0_11 processor. We are also using a confluent schema registry with a schema for both the value and the key. The configurations are attached.

The issue is that our scala consumer isn't able to deserialize the messages due to the message keys not being properly avro encoded with the schema registry. The message values appear to be serialized properly.

Is there an easy way to use the schema registry to encode the message keys as an avro record?





Re: How to avro encode a kafka message key

Hi @John King!
I'm not a confluent platform specialist, but how did you set the schema registry?
Was using this config?

Once I had a problem by setting the wrong internal serializers + schema disabled in my schema registry.

Hope this helps! :)