title: How can we convert a SourceRecord in Kafka Connect to AVRO?
body: <p>I have a use-case where I need to convert a <code>SourceRecord</code> to a <code>GenericRecord</code>. Can someone help me how to do that?</p>
  
  <p>Basically, I'm writing a custom Kafka Producer and embed that in the Connect runtime code. When the <code>producer.send()</code> is called, the SourceRecord gets converted to a <code>ProducerRecord&lt;byte[],byte[]&gt;</code> type. Now, from this, how do I get a <code>GenericRecord</code> so I can perform my custom tasks?</p>