409
kafka
data_error
ai_generated
true
io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Schema being registered is incompatible with an earlier schema; error code: 409
ID: kafka/schema-registry-incompatible-schema
82%Fix Rate
87%Confidence
1Evidence
2024-02-28First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| confluent-schema-registry 7.4.0 | active | — | — | — |
| confluent-schema-registry 7.5.0 | active | — | — | — |
| confluent-schema-registry 7.6.0 | active | — | — | — |
Root Cause
The Avro or Protobuf schema being registered violates the compatibility rules (e.g., BACKWARD, FORWARD) configured in Schema Registry.
generic中文
正在注册的Avro或Protobuf模式违反了Schema Registry中配置的兼容性规则(例如BACKWARD、FORWARD)。
Official Documentation
https://docs.confluent.io/platform/current/schema-registry/avro.htmlWorkarounds
-
90% success Modify the new schema to be backward-compatible by adding fields with defaults, or by using the Schema Registry's compatibility checker via REST API to identify the incompatibility.
Modify the new schema to be backward-compatible by adding fields with defaults, or by using the Schema Registry's compatibility checker via REST API to identify the incompatibility.
-
85% success Temporarily set the subject's compatibility to BACKWARD_TRANSITIVE to allow evolution with defaults, then change back after registration.
Temporarily set the subject's compatibility to BACKWARD_TRANSITIVE to allow evolution with defaults, then change back after registration.
中文步骤
Modify the new schema to be backward-compatible by adding fields with defaults, or by using the Schema Registry's compatibility checker via REST API to identify the incompatibility.
Temporarily set the subject's compatibility to BACKWARD_TRANSITIVE to allow evolution with defaults, then change back after registration.
Dead Ends
Common approaches that don't work:
-
70% fail
Deleting schemas may break existing consumers that rely on the old schema, and Schema Registry may prevent deletion if subjects are referenced.
-
85% fail
This disables schema evolution validation, which can lead to deserialization errors in production when consumers encounter unexpected fields.