Kafka - validating messages against schema

Hi All
We have a unique requirement where we have to validate the messages against schema. However we cannot allow producer to change the schema. Any idea how this can be achieved?
We have enabled Confluent value schema validation however because of schema backward compatibility, producers are able to produce upgrade the schema as long as it is backward compatible. What else can be done?

Are you trying to force producers to ONLY produce one schema version?

Yes… Because we are implementing a request response pattern using Kafka topics. So the control of schema evolution we want to transfer to Consumer, not to the producer

You can apply permissions to prevent evolution, https://docs.confluent.io/platform/current/schema-registry/security/index.html

2 questions

  1. No compatibility types protect the schema. All compatibility types allows to add new optional field
  2. Compatibility types are schemaregistry level property and not a topic level property

So I thought it can’t be done with schema as evolution

It can be. Security controls allow for it

You can also set the mode of the subject to READONLY. https://docs.confluent.io/platform/current/schema-registry/develop/api.html#put–mode-(string-%20subject)