liveBook · Manning

Schema registry

As explained in Microservices Patterns, Second Edition

A service that stores, retrieves, and versions data schemas and may validate compatibility between versions.

Avro encodes messages without field identifiers, so a consumer needs the writer schema to deserialize them. A schema registry stores schemas and versions centrally, letting producers and consumers evolve independently. section 8.1.6 section 8.1.6

A typical message flow works as follows:

  • The producer registers a schema and includes its registry-assigned identifier in the message header. section 8.1.6
  • The consumer uses that identifier to retrieve the writer schema, then resolves it against its reader schema; missing fields can receive reader-schema defaults. section 8.1.6
  • Build-tool API checks can enforce compatibility when new schemas are registered, supporting safe evolution while retaining compact binary encoding. section 8.1.6

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines schema registration, identifier lookup, writer-reader resolution, defaults, and build-time compatibility checks.
Examples
Uses a producer-supplied schema identifier and consumer-side defaults for fields missing from the message.
What you can do after
Apply it via Confluent Schema Registry to retrieve writer schemas and enforce compatibility during registration.
How it connects
Connects Avro serialization with schema evolution, message producers and consumers, and binary payload formats.

Also explained in

Compare how 4 books explain schema registry →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.