Schema registries and compatibility modes
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
enforce event compatibility with a schema registry.
Planned topics
- A schema registry stores versioned schemas (Avro, Protobuf, JSON Schema) per subject, often per topic.
- Producers register the schema; the registry rejects incompatible versions.
- Backward: new schema can read data written with the old one (upgrade consumers first).
- Forward: old schema can read data written with the new one (upgrade producers first).
- Full: both; the safest for long-lived topics. The
_TRANSITIVEvariants check all earlier versions. - Avro: adding a field needs a default. Protobuf: never reuse field numbers; reserve removed ones.
- Mode names and defaults differ by registry product; verify version before recording.
Draft outline details
Demonstration
an Avro OrderPlaced v2 adding "currency" with "default": "EUR", and the registry compatibility check call passing.
Check your understanding
Which change is safe in Avro under backward mode: add a field with a default, or add one without?
Show answer
With a default.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.