Search code examples
apache-kafkaavroconfluent-schema-registry

Kafka topic - schema registry compatibility


I have v001 version topic and v001-value schema subject. I made a breaking change in schema, where some optional fields are made mandatory. Although, messages in kafka before this change have this all fields. Whether I have to create new topic for this change?


Solution

  • The Schema Registry will tell you if you have an incompatible schema, depending on how you have it configured.

    https://docs.confluent.io/current/schema-registry/develop/api.html#post--compatibility-subjects-(string-%20subject)-versions-(versionId-%20version)

    have to create new topic for this change

    Not necessarily, you could delete the schema in the registry, then push on a new one.