Scenario 25.1.9 · Two independent registries break mirrored data
Two independent Schema Registries break mirrored Kafka data
Each region runs its own Schema Registry. Mirrored records carry primary's schema ids, which dr's registry does not know, so the dr consumer stops.
Run this scenario in the playgroundtwo independent registries. t+0.000s
primary and dr each run their own Schema Registry with their own _schemas. A cluster link mirrors orders into dr. Both registries hold orders-value v1, each as its own schema id 1. The Setup review flags the setup.
Open at this step: step 1, two independent registriesdr consumer stuck at O1. t+0.900s
O1 arrives in dr carrying primary's schema id 1. To dr's registry that id belongs to a different lineage, so c-dr cannot decode it and stops at offset 0.
Open at this step: step 2, dr consumer stuck at O1lag grows in dr. t+1.500s
O2 is mirrored too; c-dr stays stuck. Both registries are healthy - the failure is that they are two.
Open at this step: step 3, lag grows in drWhat you start with
A tempting DR setup: a second Schema Registry in dr, with its own _schemas topic, next to a cluster link that mirrors orders. Both registries are healthy, and both are highly available - but they assign schema ids on their own.
Step by step
- two independent registries t+0.000s primary and dr each run their own Schema Registry with their own _schemas. A cluster link mirrors orders into dr. Both registries hold orders-value v1, each as its own schema id 1. The Setup review flags the setup. Open at this step: step 1, two independent registries
- dr consumer stuck at O1 t+0.900s O1 arrives in dr carrying primary's schema id 1. To dr's registry that id belongs to a different lineage, so c-dr cannot decode it and stops at offset 0. Open at this step: step 2, dr consumer stuck at O1
- lag grows in dr t+1.500s O2 is mirrored too; c-dr stays stuck. Both registries are healthy - the failure is that they are two. Open at this step: step 3, lag grows in dr
The takeaway
Two registries are not a fault-tolerant registry. A schema id only means something in the registry that assigned it, so mirrored data needs the same lineage on both sides: mirror _schemas and run dr follower-only (25.1.8), or link the registries.
Embed this scenario
Paste this into a blog post, a course page or your team's docs. The scenario plays inside your page, and the link under it points readers to this walkthrough.
<iframe src="https://monedula.dev/kafka-simulator/embed/?scenario=25.1.9" title="Kafka Simulator: Two independent registries break mirrored data" width="100%" height="520" style="border:1px solid #d0d0d0;border-radius:8px" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
<p><a href="https://monedula.dev/kafka-simulator/scenarios/independent-registries/">Two independent Schema Registries break mirrored Kafka data</a></p> Further reading
Troubleshooting
More in Schema registry
- Confluent Schema Registry subjects and versions for Kafka
- Kafka schema compatibility: BACKWARD vs FORWARD vs FULL
- Kafka breaking schema change rejected by Schema Registry
- Kafka Schema Registry down: why warm clients keep going
- Kafka Schema Registry down: a restarted client stops
- Highly available Schema Registry: leader failover
- Schema Registry across two DCs: losing the leader DC
- Schema Registry DR: failover to a follower-only registry
- Kafka producer schema rejected as incompatible (409)
- Kafka consumer cannot read a new schema under BACKWARD