My understanding is that when using the Schema Registry, consumers don’t need to be explicitly updated with a new schema (via a code/configuration change) because whenever they encounter an unknown schema ID in a message, they’ll pull that new schema from the registry.
Given that’s the case, why is it important to enforce old-reader compatibility (AKA forward compatibility)? It seems to me like there isn’t really such a thing as an old reader when using the Registry, since consumers automatically update themselves. Would you enforce old-reader compatibility just in case there are consumers that aren’t using the Schema Registry? Or is there something else I’m missing?
Keep in mind that compatibility checks happen on registering a new version of a schema, not when consuming. Compatibility checks provide assurance on the kinds of schema changes allowed, either incrementally (e.g.,
FORWARD) or compared to all prior versions (e.g.,
FORWARD_TRANSITIVE). Those compatibility guardrails imply the order in which you should update clients when a schema evolves.
In other words, the consumer code doesn’t directly care about compatibility (it doesn’t check and enforce). The consumer developer cares about compatibility because it tells them the kinds of schema changes that are allowed and the order in which to update producers / consumers when they do change the schema.