Error while producing records via REST proxy in confluent cloud

949 views Asked by At

I am trying to produce AVRO/JSONSCHEMA record to confluent cloud REST proxy. Self managed REST Proxy server has been started pointing to confluent cloud, referring this documentation.

I am able to enlist topics, produce JSON records and consumer JSON records. But whenever I am trying to involve schema registry i.e. AVRO record or JSONSCHEMA record production, it is throwing 40801 ERROR.

For producing records, I referred REST proxy quick start

REST call details :

POST /topics/new-tweet HTTP/1.1
Host: <aws-hostname>:8082
Accept: application/vnd.kafka.v2+json
Content-Type: application/vnd.kafka.avro.v2+json
Cache-Control: no-cache
Postman-Token: c97b6f48-f68e-f114-63d8-c2389ffd77f0

{"value_schema": "{\"type\": \"record\", \"name\": \"User\", \"fields\": [{\"name\": \"name\", \"type\": \"string\"}]}", "records": [{"value": {"name": "testUser"}}]}

Error details:

{
    "error_code": 40801,
    "message": "Error when registering schema. format = AVRO, subject = new-tweet-value, schema = {\"type\":\"record\",\"name\":\"User\",\"fields\":[{\"name\":\"name\",\"type\":\"string\"}]}"
}
0

There are 0 answers