Consider a scenario, where a given Subject is consumed by multiple consumers. Now, one consumer needs an additional attribute to be processed. To support this change, a Producer has two options
Create a new topic with an additional attribute.
Update the existing topic with an additional attribute.
Option 1 may not be viable always because of multiple reasons i.e. duplication of information or extra maintenance. Option 2 requires two versions of the same topic to support multiple consumers with different needs. In this case, Kafka provides this support using Schema Registry. Schema Registry allows storing Topic’s record structure in the form of Subject using multiple schemas. Please refer below the diagram to get a high-level understanding of the schema registry, schema, and their reference within consumer and producer.
Schema Registry is a distributed storage layer for schemas which uses Kafka as its underlying storage mechanism