Kafka Schema Registry Flashcards
Schema Evolution - Backward/ Backward Transitive Compatibility
Consumer is on a higher version of the schema and is able to process data in lower version of schema
BACKWARD: consumer using schema X can process data produced with schema X or X-1
BACKWARD_TRANSITIVE: consumer using schema X can process data produced with schema X, X-1, or X-2
Permissible Changes:
Adding new fields with default values.
Removing optional fields.
Confluent Schema Registry Defaults
The Confluent Schema Registry default compatibility type is BACKWARD, not BACKWARD_TRANSITIVE. The main reason that BACKWARD compatibility mode is the default, and preferred for Kafka, is so that you can rewind consumers to the beginning of the topic. With FORWARD compatibility mode, you aren’t guaranteed the ability to read old messages.
Schema Evolution - Forward Compatibility
Consumer is on a lower version of schema and can process data which is in a higher version schema
FORWARD: data produced using schema X can be read by consumers with schema X or X-1
FORWARD_TRANSITIVE: data produced using schema X can be read by consumers with schema X, X-1, or X-2
Removing fields (if they have default values in the new schema).
Adding optional fields.