Compatibility levels are broadly categorized into BACKWARD | FORWARD | FULL | NONE. Depending on whether TRANSITIVE is applied, it determines whether only the latest version or all previous versions will be checked. The default setting is BACKWARD.
- BACKWARD: Ensures that data produced with the new schema can be processed without issues by consumers using the previous schema.
- FORWARD: Ensures that data produced with the previous schema can be processed without issues by consumers using the new schema.
- FULL: Ensures bidirectional compatibility between the new and previous schemas.
- NONE: Allows all changes regardless of compatibility between the new and previous schemas.
Compatibility Levels Overview
| Compatibility Level | Allowed Changes | Compatibility Check Target | Recommended Schema Upgrade Order |
|---|---|---|---|
| BACKWARD | Field deletion (required, optional), field addition (optional) | Latest Version (Last) | Consumer First |
| BACKWARD_TRANSITIVE | Field deletion (required, optional), field addition (optional) | All Previous Versions | Consumer First |
| FORWARD | Field deletion (optional), field addition (required, optional) | Latest Version | Producer First |
| FORWARD_TRANSITIVE | Field deletion (optional), field addition (required, optional) | All Previous Versions | Producer First |
| FULL | Field deletion (optional), field addition (optional) | Latest Version | No Preference |
| FULL_TRANSITIVE | Field deletion (optional), field addition (optional) | All Previous Versions | No Preference |
| NONE | All changes allowed | Not Checked | Flexibly Applied Based on Changes |
Recommended Schema Upgrade Order. When updating a schema that both producers and consumers are using, the schema compatibility level dictates the order in which client schemas should be upgraded. If the recommended upgrade order is not followed, schema compatibility issues may arise, potentially compromising data consistency.