Monedula

Scenario 25.1.9 · Two independent registries break mirrored data

Two independent Schema Registries break mirrored Kafka data

Schema registry · Advanced · about 4 min · Apache Kafka 4.4 · Confluent Platform feature

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 playground

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

What 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

  1. 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
  2. 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
  3. 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

Confluent documentation

Troubleshooting

More in Schema registry

All scenarios