curiousengineer
curiousengineer

Reputation: 2625

How to send messages to kafka topic via redpanda kafka rest api

I have it running locally, but I think I am running into schema issue Here is the sample call

curl --request POST \
  --url http://localhost:8082/topics/schema1 \
  --header 'Content-Type: application/vnd.kafka.json.v2+json' \
  --data '{
  "records": [
    {
      "pod": "pod1",
      "delay": 5,
      "id": 123
    }
  ]
}'

Response

{
  "error_code": 422,
  "message": "parse error at offset 34"
}

Also, on the redpanda dashboard, I tried creating a schema like below but I don't think it is working

Also, I doubt my schema will change, so I am not even sure why I have to use a registry

enter image description here

Upvotes: 0

Views: 115

Answers (0)

Related Questions