Schema Registry allows you to store Avro schemas for both producers and consumers. It also provides a RESTful interface for accessing this schema. It stores all the versions of Avro schema, and each schema version is assigned a schema ID.
When the producer sends a record to Kafka topic using Avro Serialization, it does not send an entire schema, instead, it sends the schema ID and record. The Avro serializer keeps all the versions of the schema in cache and stores data with the schemas matching the schema ID.
The consumer also uses the schema ID to read records from Kafka topic, wherein the Avro deserializer uses the schema ID to deserialize the record.
The Schema Registry also supports schema compatibility where we can modify the setting of schema compatibility to support forward and backward compatibility.
Here is an example of Avro...