Schema Registry and Subject

A schema registry stores schema definitions and supports controlled evolution. In Confluent Schema Registry, a subject groups versions to which a compatibility policy applies. A schema ID locates a schema within the registry scope, while a version locates an entry in one subject’s history. Version 2 need not have ID 2, and identical schemas can share an ID across subjects.

TopicNameStrategy commonly creates separate topic-key and topic-value subjects. RecordNameStrategy groups by the fully qualified record name across topics. TopicRecordNameStrategy combines the topic and record name. Choose the scope that matches the records intended to evolve together; unrelated event types are not automatically successive versions of one record.

A registered schema does not prove every emitted payload is valid, semantically correct, or authorized for a topic. Configure serializers, validation, producer permissions, and subject policy together. A consumer locating a valid schema ID still needs the appropriate reader and the expected contract.

Retain definitions and references for as long as retained records require them. Distinguish a temporary registry outage from a permanently unknown ID before deciding to retry or quarantine. The lab registry assigns a fresh ID to each registration and does not reproduce production schema reuse or access control.

Try the examples in Designing Topics and Event Contracts.

Reference: Confluent subjects and serialization.


Discover more from Insightful Data Lab

Subscribe to get the latest posts sent to your email.

Similar Posts

Questions, corrections, or additional insights?

This site uses Akismet to reduce spam. Learn how your comment data is processed.