liveBook · Manning

Schema governance

As explained in Apache Kafka in Action

Schema management is the practice of defining, documenting, governing, and maintaining schemas for data formats.

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

How Apache Kafka in Action covers it

How deep it goes
Outlines definitions, versioning, registries, and compatibility checks without specifying configuration commands or compatibility modes.
Examples
Uses an added producer field and inconsistent e-commerce product data to show downstream failures and pricing or inventory errors.
What you can do after
Evaluate/understand schema-management options and why compatibility checks matter before changing Kafka event formats.
How it connects
Connects schema governance to Kafka producers, consumers, schema registries, versioning, and compatibility checks.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Apache Kafka in Action. The section links point to the parts of the book it draws on.