# Schema ID Validation

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: Schema ID Validation
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: schema-reg/schema-id-validation
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: schema-reg/schema-id-validation.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/manage/pages/schema-reg/schema-id-validation.adoc
description: Learn about schema ID validation for clients using SerDes that produce to Redpanda brokers, and learn how to configure Redpanda to inspect and reject records with invalid schema IDs.
page-git-created-date: "2026-02-04"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/manage/schema-reg/schema-id-validation.md -->

You can use server-side schema ID validation for clients using Confluent’s SerDes format that produce to Redpanda brokers. You can also configure Redpanda to inspect and reject records with schema IDs that aren’t valid according to the configured Subject Name strategy and registered with the Schema Registry.

## [](#about-schema-id-validation)About schema ID validation

Records produced to a topic may use a serializer/deserializer client library, such as Confluent’s SerDes library, to encode their keys and values according to a schema.

When a client produces a record, the _schema ID_ for the topic is encoded in the record’s payload header. The schema ID must be associated with a subject and a version in the Schema Registry. That subject is determined by the _subject name strategy_, which maps the topic and schema onto a subject.

A client may be misconfigured with either the wrong schema or the wrong subject name strategy, resulting in unexpected data on the topic. A produced record for an unregistered schema shouldn’t be stored by brokers or fetched by consumers. Yet, it may not be detected or dropped until after it’s been fetched and a consumer deserializes its mismatched schema ID.

Schema ID validation enables brokers (servers) to detect and drop records that were produced with an incorrectly configured subject name strategy, that don’t conform to the SerDes wire format, or encode an incorrect schema ID. With schema ID validation, records associated with unregistered schemas are detected and dropped earlier, by a broker rather than a consumer.

> ❗ **IMPORTANT**
>
> Schema ID validation doesn’t verify that a record’s payload is correctly encoded according to the associated schema. Schema ID validation only checks that the schema ID encoded in the record is registered in the Schema Registry.

## [](#configure-schema-id-validation)Configure schema ID validation

To use schema ID validation:

-   [Enable the feature in Redpanda](#enable-schema-id-validation)

-   [Customize the subject name strategy per topic on the client](#set-subject-name-strategy-per-topic)


### [](#enable-schema-id-validation)Enable schema ID validation

By default, server-side schema ID validation is disabled in Redpanda. To enable schema ID validation, change the [`enable_schema_id_validation`](https://docs.redpanda.com/cloud-data-platform/reference/properties/cluster-properties/#enable_schema_id_validation) cluster property from its default value of `none` to either `redpanda` or `compat`:

-   `none`: Schema validation is disabled (no schema ID checks are done). Associated topic properties cannot be modified.

-   `redpanda`: Schema validation is enabled. Only Redpanda topic properties are accepted.

-   `compat`: Schema validation is enabled. Both Redpanda and compatible topic properties are accepted.


See [Configure Cluster Properties](https://docs.redpanda.com/cloud-data-platform/manage/cluster-maintenance/config-cluster/).

### [](#set-subject-name-strategy-per-topic)Set subject name strategy per topic

The subject name strategies supported by Redpanda:

| Subject Name Strategy | Subject Name Source | Subject Name Format (Key) | Subject Name Format (Value) |
| --- | --- | --- | --- |
| TopicNameStrategy | Topic name | <topic-name>-key | <topic-name>-value |
| RecordNameStrategy | Fully-qualified record name | <record-name> | <record-name> |
| TopicRecordNameStrategy | Both topic name and fully-qualified record name | <topic-name>-<record-name> | <topic-name>-<record-name> |

When [schema ID validation is enabled](#enable-schema-id-validation), Redpanda uses `TopicNameStrategy` by default.

To customize the subject name strategy per topic, set the following client topic properties:

-   Set `redpanda.key.schema.id.validation` to `true` to enable key schema ID validation for the topic, and set `redpanda.key.subject.name.strategy` to the desired subject name strategy for keys of the topic (default: `TopicNameStrategy`).

-   Set `redpanda.value.schema.id.validation` to `true` to enable value schema ID validation for the topic, and set `redpanda.value.subject.name.strategy` to the desired subject name strategy for values of the topic (default: `TopicNameStrategy`).


> 📝 **NOTE**
>
> The `redpanda.` properties have corresponding `confluent.` properties.
>
> | Redpanda property | Confluent property |
> | --- | --- |
> | redpanda.key.schema.id.validation | confluent.key.schema.validation |
> | redpanda.key.subject.name.strategy | confluent.key.subject.name.strategy |
> | redpanda.value.schema.id.validation | confluent.value.schema.validation |
> | redpanda.value.subject.name.strategy | confluent.value.subject.name.strategy |

The `redpanda.` **and `confluent.`** properties are compatible. Either or both can be set simultaneously.

If `subject.name.strategy` is prefixed with `confluent.`, the available subject name strategies must be prefixed with `io.confluent.kafka.serializers.subject.`. For example, `io.confluent.kafka.serializers.subject.TopicNameStrategy`.

> 📝 **NOTE**
>
> To support schema ID validation for compressed topics, a Redpanda broker decompresses each batch written to it so it can access the schema ID.

### [](#configuration-examples)Configuration examples

Create a topic with with `RecordNameStrategy`:

```bash
rpk topic create topic_foo \
  --topic-config redpanda.value.schema.id.validation=true \
  --topic-config redpanda.value.subject.name.strategy=RecordNameStrategy \
  -X brokers=<broker-addr>:9092
```

Alter a topic to `RecordNameStrategy`:

```bash
rpk topic alter-config topic_foo \
  --set redpanda.value.schema.id.validation=true \
  --set redpanda.value.subject.name.strategy=RecordNameStrategy \
  -X brokers=<broker-addr>:9092
```