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 |
|---|---|
| Example: 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. |
| Example: 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. |
| Example: 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. |
| Tutorial: Filter Kafka records by classification headers | Parses JSON records so that a nested Modify Headers policy can add a header to specific records. |