I tried to achieve the scenario where JSON Payload with Schema Validation on Kafka REST Proxy should be done. I followed the below steps but getting the error, can someone please help me on this,
Step-1 – Created Topic and configured confluent.value.schema.validation = true
Step-2 – Added Avro Schema to that Topic
Step-3 – Tried to produce the below sample message to topic using rest-proxy
But I am getting below error, can someone please help me on this,
{
"offsets": [
{
"partition": null,
"offset": null,
"error_code": 50002,
"error": "One or more records have been rejected due to 1 record errors in total, and only showing the first three errors at most: [RecordError(batchIndex=0, message='Record DefaultRecord(offset=0, timestamp=1678333249854, key=6 bytes, value=51 bytes) is rejected by the record interceptor io.confluent.cloud.kafka.schemaregistry.validator.CloudRecordSchemaValidator')]"
}
],
"key_schema_id": null,
"value_schema_id": null
}
I am getting same exception. I have java code base and JSON schema configured. Appreciate if anyone could help me on this.
org.apache.kafka.common.InvalidRecordException: Record DefaultRecord(offset=0, timestamp=1715752932349, key=7 bytes, value=50 bytes) is rejected by the record interceptor io.confluent.cloud.kafka.schemaregistry.validator.CloudRecordSchemaValidator