In an event-driven system, the producer and consumer are decoupled, which is the point, and also the risk. Nothing stops a producer from changing the event shape and silently breaking every downstream reader. A schema registry is how you stop it.
What it is
A schema registry is a service that stores the agreed schema for each topic and validates events against it before they’re accepted. Producers register a schema; the registry checks every new version against a compatibility rule; non-compliant events are rejected (in Phronis, routed to a dead-letter queue) instead of poisoning the stream.
Compatibility rules
The registry enforces a chosen compatibility mode. The strict one, FULL_TRANSITIVE, means a new schema must be compatible with every previous version, both forward and backward, across the whole history. Concretely: you can add an optional field; you cannot remove a field a consumer relies on or change a type out from under it. The contract can evolve, but only in ways that don’t break existing readers.
Why it matters
Without it, “don’t break the consumers” is a social agreement enforced by code review and good intentions, and it fails the first time someone ships a change in a hurry. With it, the guarantee is structural: the broker refuses to accept an event that would violate the contract. A producer literally cannot publish a breaking change. The decoupling stays safe.
Takeaway
A schema registry turns “please don’t break the event format” from a hope into an enforced rule. Pick a compatibility mode (FULL_TRANSITIVE for the strongest guarantee), and breaking changes become impossible-by-construction rather than caught-in-review. In a system where producers and consumers never talk directly, the registry is the contract that keeps them honest.
