Closed mastery-sanket-nagare closed 3 years ago
@dstelljes Could you please help me with this?
Try adjusting the subject compatibility level. You can do that with an API request; currently it’s not possible to change the compatibility level using the Confluent.SchemaRegistry library.
To add fields, the compatibility level either needs to be FORWARD
or NONE
: https://docs.confluent.io/platform/current/schema-registry/avro.html#summary
We are supposed to add new fields in the existing schema for an existing topic, for which we added those field in the POCO classes and tried to generate a message. We received the exception Exception occured while preparing a kafka producer : Incompatible artifact: [AVRO]; error code: 409
Confluent.SchemaRegistry.SchemaRegistryException: Incompatible artifact: [AVRO]; error code: 409
We have set registerAutomatically setting to AutomaticRegistrationBehavior.Always. Here is the code snippet for the producer configuration
var typeResolver = new ReflectionResolver( resolveReferenceTypesAsNullable: true // this is the important line );