---
title: "Schema being registered is incompatible (409) in Kafka"
description: "Why a Kafka producer fails with Schema Registry error 409, schema being registered is incompatible with an earlier schema, and how to fix the schema."
url: https://monedula.dev/kafka/troubleshooting/schema-incompatible/
---

# SerializationException: Schema being registered is incompatible with an earlier schema (409)

Kafka error · 409 · not retriable.

Exception: `org.apache.kafka.common.errors.SerializationException`

## Quick answer

The producer's serializer tried to register a new schema version, and Schema Registry refused it because it breaks the subject's compatibility mode. Under BACKWARD, the default, the usual cause is a new field without a default. The send fails before anything reaches Kafka: give the field a default and redeploy.

## What it means

A Confluent serializer with auto.register.schemas=true, the default, registers its schema under the subject the first time it serializes a record, with POST /subjects/{subject}/versions. The Schema Registry leader checks the new schema against the subject's compatibility mode before it stores anything: BACKWARD, the default, means a consumer on the new schema can read data written with the previous one; FORWARD means a consumer on the previous schema can read data written with the new one; FULL means both. Plain modes compare with the latest version only, the _TRANSITIVE variants with every version. A schema that fails the check is answered with HTTP 409 Conflict and the message Schema being registered is incompatible with an earlier schema for subject "orders-value", followed by details naming the broken rule. The error_code in the response body is 409 up to Confluent Platform 8.1 and 40901 from 8.2. The client raises it as a RestClientException ending in "; error code: 409", and the Avro serializer wraps it in a SerializationException, Error registering Avro schema, which KafkaProducer.send throws to the caller. No record is written, no version is created, and consumers keep reading what is already on the topic.

## Likely causes, most common first

1. **A field was added without a default under BACKWARD.** A consumer upgraded to the new schema would find no value for the new field in records written before it. Confluent's schema evolution guide calls out exactly this case: without the default the new schema is not backward compatible. The same change passes under FORWARD, where old readers simply ignore the new field.
2. **A field was removed under FORWARD.** A consumer still on the old schema expects the field in every record. Removing a field is fine under BACKWARD and fails under FORWARD unless the old schema gave that field a default.
3. **A field was renamed or its type changed.** A rename without an alias or an incompatible type change breaks both directions, so every mode except NONE rejects it. It is the change that most often needs a new field or a new topic instead of an edit.
4. **A transitive mode compared against an older version.** Under BACKWARD_TRANSITIVE, FORWARD_TRANSITIVE or FULL_TRANSITIVE the new schema must be compatible with every registered version, not just the latest. A change that is fine against v4 can still break against v1.
5. **The subject has a stricter mode than the team expected.** A subject-level mode overrides the registry-wide default. A subject set to FULL rejects changes that the global BACKWARD would accept.

## How to fix it

- Change the schema, not the registry: give the new field a default (for Avro a nullable field with default null is the usual choice) and redeploy the producer. Its next send registers the version.
- Test a schema before deploying it: POST /compatibility/subjects/{subject}/versions/latest?verbose=true returns is_compatible and the messages explaining why, and the Schema Registry Maven plugin runs the same check in CI.
- Register schemas from CI and keep auto.register.schemas=false in production, so an incompatible schema fails a pipeline instead of a live producer.
- For a change that genuinely breaks compatibility, write it to a new subject or a new topic and migrate consumers, rather than editing the schema in place.
- If the mode itself is wrong for the subject, change it on purpose with PUT /config/{subject}, and match the upgrade order to it: under BACKWARD upgrade consumers first, under FORWARD upgrade producers first.

## What not to do

- Setting the subject to NONE to get one deploy through: it removes the protection for every later change, and consumers on the old schema can start failing to deserialize.
- Hard deleting the subject's versions to start a fresh history: records already on the topic still carry the old schema ids, and a reader that needs them gets schema not found.

## Does the client retry it?

No. The registry checks the same schema against the same history and rejects it again on every send. Only a different schema or a different compatibility mode changes the answer, so the producer needs a redeploy or the subject a deliberate mode change.

## Reproduce it in the simulator

- [Kafka producer schema rejected as incompatible (409)](https://monedula.dev/kafka-simulator/scenarios/producer-schema-incompatible/) (A producer deploy is rejected as incompatible): [open at the moment it happens](https://monedula.dev/kafka-simulator/playground/?scenario=25.1.10&t=3)

## Sources

- [Confluent: schema evolution and compatibility (BACKWARD default, transitive modes, defaults)](https://docs.confluent.io/platform/current/schema-registry/fundamentals/schema-evolution.html)
- [Confluent: Schema Registry API reference (register, compatibility test, config)](https://docs.confluent.io/platform/current/schema-registry/develop/api.html)
- [Confluent: Schema Registry serializers and deserializers (auto.register.schemas)](https://docs.confluent.io/platform/current/schema-registry/fundamentals/serdes-develop/index.html)
- [Confluent Schema Registry source: SubjectVersionsResource.java (the 409 message)](https://github.com/confluentinc/schema-registry/blob/master/core/src/main/java/io/confluent/kafka/schemaregistry/rest/resources/SubjectVersionsResource.java)
- [Confluent Schema Registry source: Errors.java (INCOMPATIBLE_SCHEMA_ERROR_CODE)](https://github.com/confluentinc/schema-registry/blob/master/core/src/main/java/io/confluent/kafka/schemaregistry/rest/exceptions/Errors.java)
- [Confluent Schema Registry source: RestClientException.java](https://github.com/confluentinc/schema-registry/blob/master/client/src/main/java/io/confluent/kafka/schemaregistry/client/rest/exceptions/RestClientException.java)

## Related

- [Schema not found (40403) in Kafka: causes and fixes](https://monedula.dev/kafka/troubleshooting/schema-not-found/)
- [Schema Registry no leader: new schemas fail in Kafka](https://monedula.dev/kafka/troubleshooting/schema-registry-no-leader/)
