Skip to content

Commit c70983b

Browse files
authored
DOC-1943 single source schema id validation (#1565)
1 parent 2f697a0 commit c70983b

4 files changed

Lines changed: 43 additions & 12 deletions

File tree

local-antora-playbook.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ urls:
1010
latest_version_segment: 'current'
1111
output:
1212
clean: true
13-
runtime:
14-
log:
15-
failure_level: error
13+
1614
content:
1715
sources:
1816
- url: .

modules/manage/pages/schema-reg/schema-id-validation.adoc

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,17 @@ To use schema ID validation:
3737

3838
ifndef::env-cloud[]
3939
By default, server-side schema ID validation is disabled in Redpanda. To enable schema ID validation, change the xref:reference:cluster-properties.adoc#enable_schema_id_validation[`enable_schema_id_validation`] cluster property from its default value of `none` to either `redpanda` or `compat`:
40+
endif::[]
41+
42+
ifdef::env-cloud[]
43+
By default, server-side schema ID validation is disabled in Redpanda. To enable schema ID validation, change the xref:reference:properties/cluster-properties.adoc#enable_schema_id_validation[`enable_schema_id_validation`] cluster property from its default value of `none` to either `redpanda` or `compat`:
44+
endif::[]
4045

4146
* `none`: Schema validation is disabled (no schema ID checks are done). Associated topic properties cannot be modified.
4247
* `redpanda`: Schema validation is enabled. Only Redpanda topic properties are accepted.
4348
* `compat`: Schema validation is enabled. Both Redpanda and compatible topic properties are accepted.
4449

50+
ifndef::env-cloud[]
4551
For example, use `rpk` to set the value of `enable_schema_id_validation` to `redpanda` through the Admin API:
4652

4753
[,bash]
@@ -51,13 +57,7 @@ rpk cluster config set enable_schema_id_validation redpanda -X admin.hosts=<admi
5157
endif::[]
5258

5359
ifdef::env-cloud[]
54-
To enable schema ID validation, set the `enable_schema_id_validation` cluster property to either `redpanda` or `compat`:
55-
56-
* `none`: Schema validation is disabled (no schema ID checks are done). Associated topic properties cannot be modified.
57-
* `redpanda`: Schema validation is enabled. Only Redpanda topic properties are accepted.
58-
* `compat`: Schema validation is enabled. Both Redpanda and compatible topic properties are accepted.
59-
60-
See xref:manage:cluster-maintenance/config-cluster.adoc[]
60+
See xref:manage:cluster-maintenance/config-cluster.adoc[].
6161
endif::[]
6262

6363
=== Set subject name strategy per topic
@@ -87,6 +87,7 @@ When <<enable-schema-id-validation,schema ID validation is enabled>>, Redpanda u
8787

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

90+
ifndef::env-cloud[]
9091
* Set xref:reference:properties/topic-properties.adoc#redpandakeyschemavalidation[`redpanda.key.schema.id.validation`] to `true` to enable key schema ID validation for the topic, and set xref:reference:properties/topic-properties.adoc#redpandakeysubjectnamestrategy[`redpanda.key.subject.name.strategy`] to the desired subject name strategy for keys of the topic (default: `TopicNameStrategy`).
9192
* Set xref:reference:properties/topic-properties.adoc#redpandavalueschemavalidation[`redpanda.value.schema.id.validation`] to `true` to enable value schema ID validation for the topic, and set xref:reference:properties/topic-properties.adoc#redpandavaluesubjectnamestrategy[`redpanda.value.subject.name.strategy`] to the desired subject name strategy for values of the topic (default: `TopicNameStrategy`).
9293

@@ -109,11 +110,38 @@ The `redpanda.` properties have corresponding `confluent.` properties.
109110
| xref:reference:properties/topic-properties.adoc#redpandavaluesubjectnamestrategy[`redpanda.value.subject.name.strategy`]
110111
| xref:reference:properties/topic-properties.adoc#confluentvaluesubjectnamestrategy[`confluent.value.subject.name.strategy`]
111112
|===
113+
====
114+
endif::[]
115+
116+
ifdef::env-cloud[]
117+
* 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`).
118+
* 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`).
119+
120+
[NOTE]
121+
====
122+
The `redpanda.` properties have corresponding `confluent.` properties.
123+
124+
|===
125+
| Redpanda property | Confluent property
126+
127+
| `redpanda.key.schema.id.validation`
128+
| `confluent.key.schema.validation`
129+
130+
| `redpanda.key.subject.name.strategy`
131+
| `confluent.key.subject.name.strategy`
132+
133+
| `redpanda.value.schema.id.validation`
134+
| `confluent.value.schema.validation`
135+
136+
| `redpanda.value.subject.name.strategy`
137+
| `confluent.value.subject.name.strategy`
138+
|===
139+
====
140+
endif::[]
112141

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

115144
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`.
116-
====
117145

118146
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.
119147

@@ -139,4 +167,4 @@ rpk topic alter-config topic_foo \
139167
-X brokers=<broker-addr>:9092
140168
----
141169

142-
// end::single-source[]
170+
// end::single-source[]

modules/reference/pages/glossary.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
Terms are organized into the following categories:
44

5+
- <<Agentic Data Plane>>
56
- <<Redpanda Cloud>>
67
- <<Redpanda core>>
78
- <<Redpanda features>>

modules/reference/partials/properties/cluster-properties.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5011,10 +5011,13 @@ endif::[]
50115011
|===
50125012

50135013

5014+
// tag::redpanda-cloud[]
50145015
=== enable_schema_id_validation
50155016

50165017
Controls whether Redpanda validates schema IDs in records and which topic properties are enforced.
50175018

5019+
NOTE: Enabling this property will trigger decompression of message batches for topics on which validation is configured, which may lead to a modest increase in CPU load. Redpanda recommends monitoring CPU utilization after topics are configured.
5020+
50185021
Values:
50195022

50205023
* `none`: Schema validation is disabled (no schema ID checks are done). Associated topic properties cannot be modified.
@@ -5070,6 +5073,7 @@ endif::[]
50705073

50715074
|===
50725075

5076+
// end::redpanda-cloud[]
50735077

50745078
// tag::redpanda-cloud[]
50755079
=== enable_shadow_linking

0 commit comments

Comments
 (0)