Generated classes not compatible with Confluent Kafka client producer #331
-
I generate a class from an Avro schema as follows:
I would like to use the resulting class to produce messages using a If, on the other hand, I generate the class using Apache.Avro like so:
and compile this to an assembly and reflect the class to use an instance of it with a producer, that works because in this case the generated class does implement I'm puzzled as to why the classes generated by Chr.Avro don't implement |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey Bernhard, |
Beta Was this translation helpful? Give feedback.
Hey Bernhard,
ISpecificRecord
is an Apache.Avro interface. Chr.Avro and Apache.Avro are totally separate implementations; you should use serializers from Chr.Avro.Confluent instead of the default Avro serializer. We have some examples here: https://engineering.chrobinson.com/dotnet-avro/guides/kafka/