I have some code that is receiving fully formed Kafka ConnectRecord
s. I would like to take those records, and convert them to Avro's GenericRecord
. I imagine a utility must exist to do this. I want to do something really simple:
ConnectRecord myInput = ... // some connect record
GenericRecord myAvroInput = MyUtility.convertKafkaToAvro(myInput);
Or perhaps:
ConnectRecord myInput = ... // some connect record
GenericRecord myAvroInput = MyUtility.convertKafkaToAvro(myInput.value(), myInput.valueSchema());
Is there a utility that can help me do this?