A producer adds a field to an event. If a downstream consumer cannot handle the change, an ordinary update can cause an application failure. Schema governance gives Kafka producers and consumers an agreed way to manage data formats as they evolve. It matters especially when multiple teams use the same cluster or data is retained for a long time. section 13.0 section 4.4
A practical approach has three parts:
- Define and document the format. Data has a schema even when nobody has agreed on it; definitions can be kept in a Git repository or managed through a schema registry. section 14.0 section 4.4
- Version schemas as producers and consumers change. Compatibility checks can reject updates that would break existing applications. section 13.4
- Choose the management mechanism to suit the deployment. Confluent Schema Registry and Karapace are available options, but using a registry is secondary to managing schemas explicitly. section 4.4 section 14.0
Product data in an online store
Suppose several sources publish product data into Kafka for inventory and pricing systems. Inconsistent formats can produce inventory errors or incorrect prices. Agreeing on schemas—and checking changes before they reach consumers—helps the systems continue to exchange usable data. section 13.0 section 13.4
