Event Schema Registry Vocabulary
5 exercises — master the vocabulary of schema registries in event-driven systems: Avro vs Protobuf, backward/forward compatibility modes, schema evolution, and schema drift prevention.
0 / 5 completed
Schema registry vocabulary quick reference
- Schema registry — centralised service that stores, versions, and enforces event message schemas
- Avro — binary serialisation format with schema-based encoding; very compact, native registry integration
- Protobuf — Google's binary format; uses field numbers for stable encoding across renames
- Backward compatibility — new schema can be read by old consumers (add optional fields, don't remove required ones)
- Forward compatibility — old schema can be read by new consumers
- Full compatibility — simultaneously backward and forward compatible
- Schema drift — divergence between actual event structure and registered schema
- Schema evolution — changing a schema over time without breaking the system
1 / 5
In an event-driven architecture, dozens of services produce and consume events. A senior architect insists: "Before we add any new event type, it must be registered and versioned in the schema registry." What is a schema registry, and why is it so critical?
A schema registry is the contract enforcement layer of an event-driven architecture.
Core function:
• Stores the canonical definition (schema) of every event type the system produces
• Assigns version numbers to schemas as they evolve
• Acts as a gatekeeper: producers validate their events against the registered schema before publishing
• Consumers know the exact structure of events they will receive
Why it is critical:
Without a schema registry, event-driven systems face schema drift — producers quietly change event structure, breaking consumers that expected the old format. This failure is especially dangerous because it often appears as silent data corruption rather than an obvious error.
Real-world schema registries:
• Confluent Schema Registry — the de facto standard, used with Apache Kafka
• AWS Glue Schema Registry — for AWS-native event streams
• Apicurio Registry — open-source alternative
Key vocabulary:
• Schema ID — a unique identifier assigned to each registered schema version (e.g. schema ID 104)
• Subject — a named stream of related schemas, typically one per Kafka topic (e.g. "order-placed-value")
• Global compatibility setting — the registry-wide rule for what schema changes are permitted
Core function:
• Stores the canonical definition (schema) of every event type the system produces
• Assigns version numbers to schemas as they evolve
• Acts as a gatekeeper: producers validate their events against the registered schema before publishing
• Consumers know the exact structure of events they will receive
Why it is critical:
Without a schema registry, event-driven systems face schema drift — producers quietly change event structure, breaking consumers that expected the old format. This failure is especially dangerous because it often appears as silent data corruption rather than an obvious error.
Real-world schema registries:
• Confluent Schema Registry — the de facto standard, used with Apache Kafka
• AWS Glue Schema Registry — for AWS-native event streams
• Apicurio Registry — open-source alternative
Key vocabulary:
• Schema ID — a unique identifier assigned to each registered schema version (e.g. schema ID 104)
• Subject — a named stream of related schemas, typically one per Kafka topic (e.g. "order-placed-value")
• Global compatibility setting — the registry-wide rule for what schema changes are permitted