Hi,
I cannot produce a message with a self hosted Kafka REST Proxy v3.
Setup:
- Confluent standard cluster
- Deployed Kafka REST Proxy
I am trying to produce a record using my self managed Kafka REST Proxy with the following call:
curl -X POST -H "Content-Type: application/json" "https://myhost.net/v3/clusters/mycluster/topics/mytopic/records" -d '{"key": "1", "value": "10"}'
It returns:
{"error_code":404,"message":"HTTP 404 Not Found"}
I don’t understand why this is not working. The code exists, the configuration seems to support v3 (listing topics with v3 does work), I am using my managed REST Proxy, and not a hosted one / Confluent’s. What am I missing here?
1 Like
What version of Confluent are you using?
For what it’s worth, this worked for me against a 7.1.1 cluster:
curl http://localhost:8090/kafka/v3/clusters/MXeugl1RT6aI-2PdIze2fA/topics/test/records \
-H 'content-type:application/json' \
-X POST \
-d '{"partition_id":0,"headers":[],"key":{"type":"BINARY","data":"Zm9vYmFy"},"value":{"type":"BINARY","data":"Zm9vYmFy"},"timestamp":"2021-02-05T19:14:42Z"}'
I am using a managed kafka cluster in Confluent, and a self managed REST Proxy (chart version 6.1). What do you mean by “version of Confluent”?
Besides, why would the cluster version matter? Producing with v2 (…/topics/mytopic) does work, so I’d expect v3 to work as well (uses the same producer if I’m not wrong).
I have same problem on my local (dev) env of Confluent. Any solution?