Comparison
Data contractvsSchema registry
Data contract
the source team's deploy pipeline fails if they remove a field your models depend on, because the expectation is written down and checked.
An explicit, enforced agreement between a data producer and its consumers covering schema, semantics, freshness and how change is communicated. The word 'enforced' is the entire point: a document nobody's CI reads is a wish. It moves the cost of a breaking change from the consumer discovering it at 09:00 to the producer discovering it at commit time, which is the only version of this that survives contact with a busy product team.
Full entry →Schema registry
the producer registers the schema and gets an id, and the consumer looks that id up rather than guessing at the payload.
A service holding the versioned schemas for messages on a stream, with rules about which changes are allowed. It is what makes a binary format like Avro workable at scale: payloads carry an id rather than field names, and compatibility is checked at registration rather than discovered at consumption. Its usefulness collapses entirely if producers can register incompatible versions, so the compatibility mode is the setting that matters.
Full entry →