Description
RecordWithMetadataSchemaRegistrationConverter:
An Avro Schema might need to be registered to Kafka. Using RecordWithMetadata registered schema id can be added to record metadata. Hence adding a converter with takes RecordWithMetadata, registers Avro schema with Kafka schema registry, adds the schema id to metadata and returns RecordWithMetadata will be useful.
BytestoRecordWithMetadata converter:
To wrap bytes along with metadata
Use case:
Needed a converter which takes serialized Avro record (byte array) and schema as the string, and returns the record along with the registered schemaId.
RecordWithMetadata object can be used to carry the schemaId along with the record(in this case byte array). Hence the above two converters in order of BytestoRecordWithMetadata and RecordWithMetadataSchemaRegistrationConverter will do the work.