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
iam using REST v3 endpoint and in my topic i have enabled schema validation, but unable to produce message to the topic getting this error
Record DefaultRecord(offset=0, timestamp=1715752932349, key=7 bytes, value=50 bytes) is rejected by the record interceptor.
i have one question does REST V# enpoint support schema validation.
i am using this uri https://xyz/kafka/v3/clusters/xyz/topics/grocery-anonymous-sessions/records and trying to produce messages
with this payload
‘{“value”:{“type”:“JSON”,“data”:{“session_id”: “123”,“interaction_time”: “123”}}}’
but iam facing this error
{“error_code”:50002,“message”:“Record DefaultRecord(offset=0, timestamp=1743514376471, key=0 bytes, value=45 bytes) is rejected by the record interceptor io.confluent.cloud.kafka.schemaregistry.validator.CloudRecordSchemaValidator”}
if iam using like this then iam getting this error , i have just enabled in topic config to validate schema for value and added a data contract and trying to hit this uri to produce message . Is there any more config needed to do this
the uri iam using is correct or worng ? and can guide me a little how to use v3 rest proxy to produce a message with schema validation enabled with avro serialization?
Even With type specified it is not