Data schema registry
Note
This feature is in the Preview stage.
Schema Registry implements a schema registry, i.e., a centralized repository for managing and validating data schemas. The schema registry ensures safe data schema evolution, resolves data compatibility issues, and enhances system performance by reducing the volume of data transmitted over the network. Moreover, the schema registry will allow you to satisfy data security requirements and promote collaboration across teams. In Schema Registry, you can add schemas in Avro
Namespace
A namespace is a certain number of schemas. Schemas and subjects of different namespaces are completely isolated from one another. It is up to the user to decide how many namespaces to create and what principle to follow for placing schemas in them. You cannot create references between schemas from different namespaces.
Subject
A subject
The particular subject version contains metainformation about the schema and the schema itself. Schema versions are numbered sequentially incrementing by 1. Each schema version is unique. You can compare different schema versions.
Schema
A schema
Schemas are used to check data structure in messages on events, thereby ensuring that producers and consumers send and receive data in the same format. You can define schemas in a schema registry only within a given subject.
Reference
A reference (schema reference
- Reference name. For Avro, a reference name is a full schema name; for JSON, it is a URL address; and for Protobuf, a name of another Protobuf file (as stated in the
import
directive). - Subject name used to register the schema for the reference.
- Version representing the exact version of the registered subject's schema.
Example of Protobuf schema's reference
Let's take a look at the msg2.proto
schema in the test-msg2
subject that refers to the msg1.proto
schema in the test-msg1
subject.
msg1.proto
file contents:
message msg1 {
int8 my_field = 1
}
msg2.proto
contents:
import "msg1.proto"
message msg2 {
msg1 my_field = 1
}
To link these schemas, specify the following reference when loading the msg2.proto
schema into the test-msg2
subject:
msg1.proto
: Reference name.test-msg1
: Subject name used to register the schema for themsg1.proto
reference.1
: Reference schema version.