
Build an AI agent once and reuse it across teams
How Redpanda Agentic Data Plane keeps IT, HR, and ops agents unified and controlled across reuses

Learn the fundamentals of schema registry for Kafka and how Redpanda schema registry makes it all much simpler
A schema registry is a central service that stores, versions, and validates the schemas producers and consumers use to serialize and deserialize messages. Instead of every application defining message formats on its own, a producer registers a schema once, the registry assigns it a unique ID, and each message carries that small ID instead of the full schema. Consumers use the ID to fetch the exact schema they need to read the data. The registry also checks every new schema version against compatibility rules, so a change in one service doesn’t break another.
A schema, in simple terms, is a description of how data is structured: the fields a message contains, their data types, and which ones are required. In streaming, schemas are usually written in Apache Avro™, Protocol Buffers (Protobuf), or JSON Schema.
Apache Kafka® doesn’t include a schema registry. It stores and delivers messages as raw bytes and leaves their structure to applications, so most Kafka users run a separate registry service alongside their cluster. Redpanda takes a different approach and builds its schema registry directly into every broker. This article explains how a schema registry works, what it adds to every message, how schema evolution works, and when you need one.
In the Kafka client API model, a message (a record) is the smallest data exchange unit. A message contains a key and a value, carrying arbitrary information related to business use cases.
A serializer converts a business object in memory into a byte array to save or transmit it easier, so a Kafka producer client invokes a serializer before a message is written to the network. On the other hand, a deserializer reverses the process by constructing a business object from a byte array, and so a Kafka consumer client invokes a deserializer right after it reads a message from the network.
Since a schema defines the structure of the data format, serializers and deserializers use the schema to influence the shape of data during the serialization/deserialization process. In the context of Kafka APIs, serializers and deserializers are a part of the language-specific SDK, and support data formats including Apache Avro™, JSON Schema, and Google’s Protobuf. (For Kafka, Avro is by far the most popular choice for data serialization.)
The following figure sums it all up:

When there's a message, the serializer does its job based on the schema specified. This schema is often called the writer's schema. When the message gets deserialized, the deserializer always needs a schema to continue, and it’s called the reader's schema.
The question is how the deserializer gets the writer’s schema. Without a registry, you have two options:
Neither option protects you from the bigger risk: a producer changing the format in a way existing consumers can’t read. The broker can’t catch the problem, because it treats every message as bytes. The first sign of trouble is usually a consumer failing in production.
A schema registry solves both problems. It keeps every schema in one place, lets each message carry a compact ID instead of the full schema, and rejects incompatible schema changes before any producer can use them.

Kafka only transfers data in byte format. In fact, it doesn’t know what kind of data it’s sending or receiving. But producers and consumers need to know what type of data they’re handling so they can process it correctly. When a producer sends a message to a Kafka cluster, the data can be in any format the producer chooses. So every time you change the schema for messages, every related consumer and producer needs to know.
A schema registry makes this easy by providing a central repository that consumers and producers can access to find out the schema of a given message. The schema registry also maintains a history of schemas and supports a schema evolution strategy, so you can plan how future applications will maintain compatibility with a certain schema—even if you add or remove fields later.
A schema registry organizes information in three levels:
For example, the first schema you register under orders-value becomes version 1 and might receive ID 1. If other teams then register schemas for their own topics, your next orders-value change becomes version 2 but could receive ID 15. Consumers never need to track versions; the ID in each message is enough to fetch the exact schema that wrote it.
Serializers that use a schema registry don’t change the Kafka message format itself. Instead, they prefix the serialized key or value with a small header. In the widely used Confluent-compatible wire format, which Redpanda also uses, every serialized message starts like this:
For Protobuf, one extra field sits between the schema ID and the payload: a short list of message indexes that identifies which message type in the .proto file was used, because one Protobuf schema can define several message types.
That 5-byte prefix is all a consumer needs. A deserializer that finds a first byte other than 0 knows the message wasn’t written by a registry-aware serializer and rejects it.

Finally, the serializer serializes the message and returns the byte sequence to the producer.
Basically, the consumer fetches messages from Redpanda and hands them over to the deserializer. The deserializer first checks the existence of the magic byte and rejects the message if it doesn't.
The deserializer then reads the schemaID and checks whether the related schema exists in its local cache. If that exists, deserialization happens with that schema. Otherwise, the deserializer retrieves the schema from the registry based on the schemaID. Once the schema is in place, the deserializer proceeds with the deserialization.
No. Kafka works without one, and so does Redpanda. Producers can send plain JSON or strings, and consumers can parse them however they like. A schema registry becomes worth it once the cost of a broken message outweighs the cost of managing schemas:
You can usually skip it for prototypes, single-team pipelines where one codebase owns both the producer and the consumer, or topics that carry unstructured data such as logs.
Redpanda is a Kafka API-compatible streaming data platform that eliminates Zookeeper® and the JVM, autotunes itself for modern hardware, and ships in a single binary to give you 10x lower latencies and cut your cloud spend—without sacrificing your data’s reliability or durability.
Redpanda builds the schema registry directly into every broker. There’s no separate service to deploy, scale, or secure. The registry stores schemas in Redpanda’s own replicated storage, listens on port 8081 by default, and implements the Confluent Schema Registry API, so existing serializers, deserializers, and tools work without code changes. It supports Avro, Protobuf, and JSON Schema, along with the full set of compatibility modes.
Because the registry lives inside the broker, Redpanda can also validate schema IDs on the server. With server-side schema ID validation enabled for a topic, the broker checks each record’s schema ID against the registry and drops records with unregistered schemas, so bad data is caught when it’s produced rather than when a consumer fails to read it.
You can manage schemas with the Schema Registry API, with rpk registry commands, or visually in Redpanda Console.
The diagram below shows how it all works together.

Once Redpanda is running, the schema registry is already available on port 8081. You can register and inspect schemas with rpk:
rpk registry schema create orders-value --schema order.avsc
rpk registry subject list
rpk registry schema get --id 1
rpk registry schema check-compatibility orders-value --schema order-v2.avsc
The last command checks whether a proposed new version is compatible with the subject’s existing versions before you register it. For the full set of endpoints, see the Schema Registry API reference.
In this first post, you learned the importance of having a schema registry in a streaming data architecture and some inner workings of message serialization and deserialization within the scope of a Kafka client application. Moreover, we explored the basics of the Redpanda schema registry and how it supports modern architectures like serverless Kafka.
In our next post, we’ll walk you through how you can use Redpanda’s built-in schema registry to produce and consume Avro messages—in just five steps. Make sure to subscribe to our blog so you don’t miss a post!
To learn more about Redpanda, check out our documentation and browse the Redpanda blog for tutorials and guides on how to easily integrate with Redpanda. For a more hands-on approach, take Redpanda's free Community edition for a spin.
If you get stuck, have a question, or just want to chat with our engineers and fellow Redpanda users, join our Redpanda Community on Slack.
Yes. Redpanda’s built-in schema registry implements the Confluent Schema Registry API and uses the same wire format, so Confluent serializers, deserializers, and other tools built on the API work with Redpanda without code changes. Point your client’s schema.registry.url setting at a Redpanda broker on port 8081.
Plain JSON repeats every field name in every message and has no built-in types or contract, so messages are larger and nothing stops a producer from changing their shape. Avro serializes data into a compact binary form without field names, validates it against a schema, and has well-defined rules for schema evolution. The trade-off is that Avro messages aren’t human-readable without the schema. If you want to stay with JSON, JSON Schema adds validation and compatibility checks through the same registry.
A schema defines the structure of data, such as its fields, types, and required values, so every system that writes or reads the data agrees on what it means. In streaming, schemas let producers serialize data consistently, let consumers deserialize it correctly, and give teams a contract they can evolve safely over time.

How Redpanda Agentic Data Plane keeps IT, HR, and ops agents unified and controlled across reuses

Redpanda Shadowing now carries topic data, schemas, offsets, and ACLs on a single link for a low-risk, no-data-loss cutover

A database designed for agentic governance, now available on Google Cloud
Subscribe to our VIP (very important panda) mailing list to pounce on the latest blogs, surprise announcements, and community events!
Opt out anytime.