This policy is used to validate messages using a provided schema during the produce phase.
Common use cases for the Schema Validation policy:
|
Use case |
Description |
|---|---|
| Validate messages against a Confluent Schema Registry | Ensure that all messages produced to any topic are validated against a Confluent Schema Registry, and mark messages that don’t conform. |
| Validate messages for subset of topics against JSON | Ensure that all messages produced to topics with a specific prefix are valid JSONs, and reject messages that don’t conform. |
| Validate messages for a topic | Ensure that all messages produced to a topic are validated against a schema, and reject messages that don’t conform. |