liveBook · Manning

Schema resolution

As explained in Microservices Patterns, Second Edition

Schema resolution is the process of reconciling a serialized message's writer schema with a consumer's reader schema.

When producers and consumers evolve independently, a consumer needs the writer schema to interpret a serialized message. With Avro and a schema registry, the producer includes a registry-assigned schema identifier in the message header. The consumer uses it to retrieve the writer schema, then resolves it against its own reader schema. section 8.1.6

Resolution can fill fields absent from the writer message with defaults in the reader schema. A registry can also enforce compatibility when schemas are registered and expose checks for build tools. This supports schema evolution and independent deployment while retaining compact binary encoding; the trade-off is requiring additional tooling. section 8.1.6

How Microservices Patterns, Second Edition covers it

How deep it goes
Traces schema identification, writer-schema retrieval, and reader-schema resolution, but does not detail the resolution rules.
Examples
Uses missing message fields filled with defaults from the reader schema as an example.
What you can do after
Understand how consumers retrieve writer schemas and reconcile them with reader schemas, including defaults for missing fields.
How it connects
Connects Avro, schema registries, writer and reader schemas, and schema evolution.

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.