-
Notifications
You must be signed in to change notification settings - Fork 52
DOC-2254: Add Confluent Schema Registry schema migration via Shadowing #1776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: beta
Are you sure you want to change the base?
Changes from all commits
64b9778
07de649
41a6da3
7e707ea
d79407a
e5da0de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,323 @@ | ||||||||||||||||||||||||||||||||||||||||
| = Migrate Schemas from Confluent Schema Registry | ||||||||||||||||||||||||||||||||||||||||
| :description: Replicate subjects, versions, and compatibility settings from a Confluent Schema Registry into a Redpanda shadow cluster. | ||||||||||||||||||||||||||||||||||||||||
| :env-linux: true | ||||||||||||||||||||||||||||||||||||||||
| :page-topic-type: how-to | ||||||||||||||||||||||||||||||||||||||||
| :page-categories: Management, High Availability, Disaster Recovery | ||||||||||||||||||||||||||||||||||||||||
| :learning-objective-1: Configure a shadow link that continuously replicates schemas from a Confluent Schema Registry | ||||||||||||||||||||||||||||||||||||||||
| :learning-objective-2: Filter replication by context or subject and map source contexts to destination contexts | ||||||||||||||||||||||||||||||||||||||||
| :learning-objective-3: Monitor schema replication status and resolve validation errors | ||||||||||||||||||||||||||||||||||||||||
| // tag::single-source[] | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| // DRAFT-VERIFY (DOC-2254): This page documents an unreleased v26.2 feature (ENG-1171). | ||||||||||||||||||||||||||||||||||||||||
| // Engineering PRs redpanda#30999 (HTTP source reader) and redpanda#30984 (failover) were | ||||||||||||||||||||||||||||||||||||||||
| // still open when this draft was written (2026-07-02). Re-verify every DRAFT-VERIFY item | ||||||||||||||||||||||||||||||||||||||||
| // against merged code and a running 26.2 build before publishing. SME: @pgellert. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| ifndef::env-cloud[] | ||||||||||||||||||||||||||||||||||||||||
| [NOTE] | ||||||||||||||||||||||||||||||||||||||||
| ==== | ||||||||||||||||||||||||||||||||||||||||
| include::shared:partial$enterprise-license.adoc[] | ||||||||||||||||||||||||||||||||||||||||
| ==== | ||||||||||||||||||||||||||||||||||||||||
| endif::[] | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| When you migrate to Redpanda from a deployment that uses a Confluent Schema Registry, your producers and consumers depend on the glossterm:schema[,schemas] stored in that registry. Shadowing removes this migration obstacle: a glossterm:shadow link[] continuously replicates schemas from the source Confluent Schema Registry into the glossterm:Schema Registry[] built into the Redpanda glossterm:shadow cluster[], preserving glossterm:subject[] names, versions, and compatibility settings. Because both registries stay synchronized until cutover, your applications keep working on Redpanda without a separate schema migration step. Use this approach when you migrate from Confluent to Redpanda, or when you maintain a Redpanda disaster recovery cluster for a system that keeps its schemas in a Confluent Schema Registry. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| After reading this page, you will be able to: | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| * [ ] {learning-objective-1} | ||||||||||||||||||||||||||||||||||||||||
| * [ ] {learning-objective-2} | ||||||||||||||||||||||||||||||||||||||||
| * [ ] {learning-objective-3} | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| == How schema replication works | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| When you configure a shadow link with the `shadow_schema_registry_api` option, the shadow cluster polls the source Schema Registry over HTTP and imports changes into its own Schema Registry. Two sync cycles keep the registries in step: | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| * *Tail syncs* run frequently (default: every 10 seconds) to pick up incremental changes. | ||||||||||||||||||||||||||||||||||||||||
| * *Full syncs* scan all selected subjects (default: every 5 minutes) to catch anything a tail sync missed. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| Replicated schemas keep their original subject names and version IDs, so producers and consumers that reference schemas by ID continue to work after failover. Schemas that reference other schemas import in dependency order. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| Before importing a schema, Redpanda validates it against the Redpanda Schema Registry implementation. If a schema uses features that Redpanda does not support, the sync either reports an error and skips the schema, or removes the unsupported fields and imports the rest, depending on the <<choose-a-validation-policy,validation policy>> you choose. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| While the link is active, the destination contexts that the link replicates into are read-only: the shadow cluster rejects client writes to those contexts so that replicated schemas remain identical to the source. Contexts outside the link's filter remain writable. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [NOTE] | ||||||||||||||||||||||||||||||||||||||||
| ==== | ||||||||||||||||||||||||||||||||||||||||
| This API-based mode is an alternative to the byte-for-byte `_schemas` topic replication described in xref:manage:disaster-recovery/shadowing/setup.adoc#schema-registry-synchronization[Configure Shadowing]. A shadow link uses one Schema Registry sync mode or the other, not both: | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| * Use *topic mode* (`shadow_schema_registry_topic`) when the source is another Redpanda cluster and you want an exact, complete replica of its Schema Registry. Topic mode shadows the `_schemas` topic byte for byte, so it does not filter, remap, or validate schemas. | ||||||||||||||||||||||||||||||||||||||||
| * Use *API mode* (`shadow_schema_registry_api`) when the source is a Confluent Schema Registry, or when you need to replicate only selected contexts or subjects, map source contexts to different destination contexts, or control how schemas that use unsupported features are handled with a validation policy. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| Schema replication does not add any cluster configuration properties. All settings live in the shadow link configuration. | ||||||||||||||||||||||||||||||||||||||||
| ==== | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| == Use cases | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| * *Migrate from Confluent to Redpanda*: Replicate schemas continuously while xref:manage:disaster-recovery/shadowing/setup.adoc[Shadowing] replicates your topic data, then cut applications over to Redpanda once both are in sync. No separate schema migration tooling is required. | ||||||||||||||||||||||||||||||||||||||||
| * *Phased migration*: Use context and subject filters to migrate one team, application, or environment at a time. | ||||||||||||||||||||||||||||||||||||||||
| * *Registry reorganization*: Map source contexts to different destination contexts to restructure your Schema Registry as part of the migration. | ||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pgellert do we want to also mention here about disaster recovery? 🤔 |
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| == Prerequisites | ||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One more to add here: if schema registry contexts are being used, customers must have the schema_registry_enable_qualified_subjects config enabled -- https://docs.redpanda.com/streaming/current/manage/schema-reg/schema-reg-contexts/#prerequisites |
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| * A shadow cluster running Redpanda version 26.2 or later. The schema replication feature activates after all brokers complete the upgrade. | ||||||||||||||||||||||||||||||||||||||||
| * Network connectivity from the shadow cluster to the source Schema Registry HTTP endpoint. | ||||||||||||||||||||||||||||||||||||||||
| * Credentials for the source registry with permission to read subjects, versions, and configuration. For Confluent Cloud, use a Schema Registry API key and secret. | ||||||||||||||||||||||||||||||||||||||||
| * A shadow link to the source cluster, or a plan to create one. See xref:manage:disaster-recovery/shadowing/setup.adoc[Configure Shadowing]. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| // DRAFT-VERIFY (DOC-2254): Confirm with @pgellert whether the destination Schema Registry | ||||||||||||||||||||||||||||||||||||||||
| // (_schemas topic) must be empty before enabling API-mode sync, or whether the destination | ||||||||||||||||||||||||||||||||||||||||
| // bootstrap in redpanda#30999 relaxes this. Topic mode requires it; API mode is unconfirmed. | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+67
to
+69
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In API mode, the schemas topic doesn't have to be empty, but the target contexts the link would import (scoped to the mapped contexts based on the |
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| == Limitations | ||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another limitation to add is that there is currently no coordination between topic data replication and the schema registry syncing task, so topic data serialized with Confluent's SerDes format may contain schema IDs on the shadow cluster earlier than those schemas get replicated over. |
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| * HTTP basic authentication is the only supported authentication method for the source registry. | ||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mTLS is also supported as an authentication mechanism, in addition to HTTP Basic |
||||||||||||||||||||||||||||||||||||||||
| * A shadow link replicates Schema Registry data in one mode only: either `shadow_schema_registry_topic` or `shadow_schema_registry_api`. | ||||||||||||||||||||||||||||||||||||||||
| * Replication is one way, from the source registry to the shadow cluster. Destination contexts owned by the link are read-only until failover. | ||||||||||||||||||||||||||||||||||||||||
| * Schemas that use Confluent features not supported by the Redpanda Schema Registry are not replicated as-is. Choose a <<choose-a-validation-policy,validation policy>> to control whether these schemas are skipped or imported without the unsupported fields. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| // DRAFT-VERIFY (DOC-2254): Get the exact list of unsupported Confluent schema features | ||||||||||||||||||||||||||||||||||||||||
| // (rule sets? metadata tags?) from @pgellert and document them here. | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+78
to
+79
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In schema definitions:
|
||||||||||||||||||||||||||||||||||||||||
| // DRAFT-VERIFY (DOC-2254): ENG-1171 mentions wildcard support in filters, but the rpk | ||||||||||||||||||||||||||||||||||||||||
| // source shows plain string lists for contexts/subjects. Confirm whether wildcards or | ||||||||||||||||||||||||||||||||||||||||
| // patterns are accepted before documenting either behavior. | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+80
to
+82
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only plain string lists for contexts and subjects is supported |
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| == Configure schema replication | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| Add the `shadow_schema_registry_api` option to the `schema_registry_sync_options` section of your shadow link configuration file. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| The following sample configuration file creates a shadow link that shadows all source topics and replicates schemas from a Confluent Schema Registry. The highlighted lines show the schema replication settings, which the sections that follow explain. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| // NOTE: keep the lines= range pointing at the schema_registry_sync_options block | ||||||||||||||||||||||||||||||||||||||||
| // if you edit this sample. | ||||||||||||||||||||||||||||||||||||||||
| [,yaml,lines=20-38] | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
| # Sample shadow link configuration with API-mode Schema Registry replication | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| name: confluent-migration # Unique name for this shadow link | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| client_options: | ||||||||||||||||||||||||||||||||||||||||
| bootstrap_servers: # Source Kafka cluster brokers | ||||||||||||||||||||||||||||||||||||||||
| - <source-broker-1>:<port> # Example: "pkc-xxxxx.us-east-1.aws.confluent.cloud:9092" | ||||||||||||||||||||||||||||||||||||||||
| - <source-broker-2>:<port> | ||||||||||||||||||||||||||||||||||||||||
| # For the TLS and authentication settings that the shadow cluster uses to | ||||||||||||||||||||||||||||||||||||||||
| # connect to the source Kafka cluster, see the complete configuration file | ||||||||||||||||||||||||||||||||||||||||
| # reference in Configure Shadowing. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| topic_metadata_sync_options: | ||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure we need to provide
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, we can remove the |
||||||||||||||||||||||||||||||||||||||||
| interval: 30s # How often to sync topic metadata | ||||||||||||||||||||||||||||||||||||||||
| auto_create_shadow_topic_filters: | ||||||||||||||||||||||||||||||||||||||||
| - pattern_type: LITERAL | ||||||||||||||||||||||||||||||||||||||||
| filter_type: INCLUDE | ||||||||||||||||||||||||||||||||||||||||
| name: '*' # Shadow all source topics | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| schema_registry_sync_options: | ||||||||||||||||||||||||||||||||||||||||
| shadow_schema_registry_api: # API mode: replicate from a Confluent Schema Registry | ||||||||||||||||||||||||||||||||||||||||
| source_url: https://psrc-xxxxx.us-east-1.aws.confluent.cloud # Source Schema Registry endpoint | ||||||||||||||||||||||||||||||||||||||||
| auth_options: | ||||||||||||||||||||||||||||||||||||||||
| basic: | ||||||||||||||||||||||||||||||||||||||||
| username: <sr-api-key> # Confluent Schema Registry API key | ||||||||||||||||||||||||||||||||||||||||
| password: <sr-api-secret> # Confluent Schema Registry API secret | ||||||||||||||||||||||||||||||||||||||||
| tls_settings: | ||||||||||||||||||||||||||||||||||||||||
| enabled: true # Use TLS for the connection | ||||||||||||||||||||||||||||||||||||||||
| tail_interval: 10s # Optional: poll for incremental changes (default: 10s) | ||||||||||||||||||||||||||||||||||||||||
| full_sync_interval: 5m # Optional: full source scan interval (default: 5m) | ||||||||||||||||||||||||||||||||||||||||
| max_source_requests_per_second: 30 # Optional: rate limit for source requests (default: 30) | ||||||||||||||||||||||||||||||||||||||||
| source_filter: | ||||||||||||||||||||||||||||||||||||||||
| contexts: | ||||||||||||||||||||||||||||||||||||||||
| - "." # The default context | ||||||||||||||||||||||||||||||||||||||||
| subjects: [] # Empty: all subjects in the selected contexts | ||||||||||||||||||||||||||||||||||||||||
| destination: | ||||||||||||||||||||||||||||||||||||||||
| identity: {} # Keep source context names | ||||||||||||||||||||||||||||||||||||||||
| unsupported_schema_feature_policy: FAIL # FAIL (default) or REMOVE | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| For the complete configuration file, including consumer offset and security synchronization options, see xref:manage:disaster-recovery/shadowing/setup.adoc#create-a-shadow-link[Configure Shadowing]. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| === Generate a configuration template | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| Generate a configuration file template that includes all available fields with comments: | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [,bash] | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
| rpk shadow config generate --print-template -o shadow-config-template.yaml | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| For detailed command options, see xref:reference:rpk/rpk-shadow/rpk-shadow-config-generate.adoc[`rpk shadow config generate`]. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| === Connect to the source registry | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| Configure the connection to the source Schema Registry: | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [,yaml] | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
| schema_registry_sync_options: | ||||||||||||||||||||||||||||||||||||||||
| shadow_schema_registry_api: | ||||||||||||||||||||||||||||||||||||||||
| source_url: https://psrc-xxxxx.us-east-1.aws.confluent.cloud # Source Schema Registry endpoint | ||||||||||||||||||||||||||||||||||||||||
| auth_options: | ||||||||||||||||||||||||||||||||||||||||
| basic: | ||||||||||||||||||||||||||||||||||||||||
| username: <sr-api-key> # Confluent Schema Registry API key | ||||||||||||||||||||||||||||||||||||||||
| password: <sr-api-secret> # Confluent Schema Registry API secret | ||||||||||||||||||||||||||||||||||||||||
| tls_settings: | ||||||||||||||||||||||||||||||||||||||||
| enabled: true # Use TLS for the connection | ||||||||||||||||||||||||||||||||||||||||
| tls_file_settings: | ||||||||||||||||||||||||||||||||||||||||
| ca_path: /path/to/ca.crt # Optional: CA certificate for custom trust | ||||||||||||||||||||||||||||||||||||||||
| tail_interval: 10s # How often to poll for incremental changes | ||||||||||||||||||||||||||||||||||||||||
| full_sync_interval: 5m # How often to run a full scan | ||||||||||||||||||||||||||||||||||||||||
| max_source_requests_per_second: 30 # Rate limit for requests to the source registry | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| The intervals and rate limit are optional. If you omit them, Redpanda uses the defaults shown above. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| // DRAFT-VERIFY (DOC-2254): Defaults (10s / 5m / 30 rps) are from | ||||||||||||||||||||||||||||||||||||||||
| // src/v/cluster_link/model/types.h on dev. Re-check at code-complete. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| === Select contexts and subjects | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| By default, the link replicates the entire source registry. To replicate a subset, add a `source_filter` with the contexts or subjects to include: | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [,yaml] | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
| schema_registry_sync_options: | ||||||||||||||||||||||||||||||||||||||||
| shadow_schema_registry_api: | ||||||||||||||||||||||||||||||||||||||||
| # ...connection settings... | ||||||||||||||||||||||||||||||||||||||||
| source_filter: | ||||||||||||||||||||||||||||||||||||||||
| contexts: | ||||||||||||||||||||||||||||||||||||||||
| - "." # The default context | ||||||||||||||||||||||||||||||||||||||||
| - ".prod" # A named context | ||||||||||||||||||||||||||||||||||||||||
| subjects: | ||||||||||||||||||||||||||||||||||||||||
| - orders-value # A subject in the default context | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| Schema Registry contexts provide independent namespaces for subjects within one registry. The default context is named `.`. For more information, see xref:manage:schema-reg/schema-reg-contexts.adoc[Schema Registry Contexts]. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| === Map source contexts to destination contexts | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| Choose how replicated contexts are named on the shadow cluster: | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| * `identity`: Keep the source context names (default behavior for migrations). | ||||||||||||||||||||||||||||||||||||||||
| * `exact`: Map each source context to a different destination context. | ||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's important to call out here that |
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [,yaml] | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
| schema_registry_sync_options: | ||||||||||||||||||||||||||||||||||||||||
| shadow_schema_registry_api: | ||||||||||||||||||||||||||||||||||||||||
| # ...connection settings and filters... | ||||||||||||||||||||||||||||||||||||||||
| destination: | ||||||||||||||||||||||||||||||||||||||||
| identity: {} # Keep source context names | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| To rename contexts during replication: | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [,yaml] | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
| schema_registry_sync_options: | ||||||||||||||||||||||||||||||||||||||||
| shadow_schema_registry_api: | ||||||||||||||||||||||||||||||||||||||||
| # ...connection settings and filters... | ||||||||||||||||||||||||||||||||||||||||
| destination: | ||||||||||||||||||||||||||||||||||||||||
| exact: | ||||||||||||||||||||||||||||||||||||||||
| mappings: | ||||||||||||||||||||||||||||||||||||||||
| - source: "." # Source context | ||||||||||||||||||||||||||||||||||||||||
| destination: ".shadow" # Destination context on the shadow cluster | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [[choose-a-validation-policy]] | ||||||||||||||||||||||||||||||||||||||||
| === Choose a validation policy | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| The `unsupported_schema_feature_policy` setting controls what happens when a source schema uses features that the Redpanda Schema Registry does not support: | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [cols="1,3"] | ||||||||||||||||||||||||||||||||||||||||
| |=== | ||||||||||||||||||||||||||||||||||||||||
| | Policy | Behavior | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| | `FAIL` (default) | ||||||||||||||||||||||||||||||||||||||||
| | The schema is not replicated. The sync records an error, reports it in the link status, and continues with the remaining schemas. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| | `REMOVE` | ||||||||||||||||||||||||||||||||||||||||
| | The unsupported fields are removed and the rest of the schema is imported. The sync counts each modification in the link status. | ||||||||||||||||||||||||||||||||||||||||
| |=== | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [,yaml] | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
| schema_registry_sync_options: | ||||||||||||||||||||||||||||||||||||||||
| shadow_schema_registry_api: | ||||||||||||||||||||||||||||||||||||||||
| # ...connection settings, filters, and destination... | ||||||||||||||||||||||||||||||||||||||||
| unsupported_schema_feature_policy: FAIL | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| === Create the shadow link | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| Create the shadow link with your completed configuration file: | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [,bash] | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
| rpk shadow create <link-name> --config-file shadow-config.yaml | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| For detailed command options, see xref:reference:rpk/rpk-shadow/rpk-shadow-create.adoc[`rpk shadow create`]. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| To change the schema replication settings on an existing link, see xref:reference:rpk/rpk-shadow/rpk-shadow-update.adoc[`rpk shadow update`]. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| // DRAFT-VERIFY (DOC-2254): Confirm the exact `rpk shadow create` argument order | ||||||||||||||||||||||||||||||||||||||||
| // (link name vs --config-file only) against the 26.2 rpk build. | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+251
to
+261
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Create doesn't take a link-name parameter:
Suggested change
|
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| == Verify the configuration | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| Confirm that the link is configured for API-based schema replication: | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [,bash] | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
| rpk shadow describe <link-name> | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| The output includes the shadowing mode, source URL, sync intervals, validation policy, and your context and subject filters. For detailed command options, see xref:reference:rpk/rpk-shadow/rpk-shadow-describe.adoc[`rpk shadow describe`]. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| == Monitor replication status | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| Check schema replication progress and errors for a link: | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [,bash] | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
| rpk shadow status <link-name> | ||||||||||||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| The Schema Registry section of the output reports: | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| [cols="1,3"] | ||||||||||||||||||||||||||||||||||||||||
| |=== | ||||||||||||||||||||||||||||||||||||||||
| | Field | Description | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| | Inventory | ||||||||||||||||||||||||||||||||||||||||
| | The number of selected subjects and subject versions on the source, compared with the number of subjects and versions on the destination. The registries are synchronized when the destination counts match the selected source counts. A destination that is behind the source indicates that replication is still in progress. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| | Current sync | ||||||||||||||||||||||||||||||||||||||||
| | The type of the sync in progress (`FULL` or `TAIL`) and the number of subject versions, compatibility configurations, and modes it has changed, including how many unsupported features were removed and how many errors occurred. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| | Last full sync | ||||||||||||||||||||||||||||||||||||||||
| | Start time, finish time, and change counts for the most recent completed full sync. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| | Totals since task start | ||||||||||||||||||||||||||||||||||||||||
| | Cumulative change and error counts since the schema replication task started. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+298
to
+300
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure where exactly to place this information on this page, but I think we should document somewhere that:
|
||||||||||||||||||||||||||||||||||||||||
| | Last error | ||||||||||||||||||||||||||||||||||||||||
| | The most recent replication error. With the `FAIL` validation policy, schemas that fail validation appear here. | ||||||||||||||||||||||||||||||||||||||||
| |=== | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| For detailed command options, see xref:reference:rpk/rpk-shadow/rpk-shadow-status.adoc[`rpk shadow status`]. For general link monitoring, see xref:manage:disaster-recovery/shadowing/monitor.adoc[Monitor Shadowing]. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| == Fail over | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| When you fail over a shadow link, schema replication from the source registry stops and the write-blocked destination contexts become writable, so your applications can register new schemas on the promoted cluster. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| // DRAFT-VERIFY (DOC-2254): Failover behavior (single `paused` field pauses the sync task | ||||||||||||||||||||||||||||||||||||||||
| // and lifts per-context write blocks) is from open PR redpanda#30984. Confirm the final | ||||||||||||||||||||||||||||||||||||||||
| // mechanism and whether any manual steps apply to schema replication during failover. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| For the complete failover procedure, see xref:manage:disaster-recovery/shadowing/failover.adoc[Failover]. | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+307
to
+315
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On failover, it is necessary to also pause the schema registry syncing task (through setting the paused field in the config to true) to stop any further syncing and to unblock the schema registry for writes. As the draft verify note says, the relevant implementation is in redpanda-data/redpanda#30984. |
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| == Next steps | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| * xref:manage:disaster-recovery/shadowing/setup.adoc[Configure Shadowing] to replicate topic data, consumer offsets, and ACLs alongside your schemas. | ||||||||||||||||||||||||||||||||||||||||
| * xref:manage:disaster-recovery/shadowing/monitor.adoc[Monitor Shadowing] | ||||||||||||||||||||||||||||||||||||||||
| * xref:manage:schema-reg/schema-reg-contexts.adoc[Schema Registry Contexts] | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| // end::single-source[] | ||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is false as stated, because we do add 2 new cluster configurations: https://github.com/redpanda-data/redpanda/blob/c153614a6972b0ee9e109ae93dc9d0a9369a1d37/src/v/config/configuration.cc#L3981-L3996
But they are escape hatches / tunables that won't commonly need to be adjusted.