AnsweredAssumed Answered

kafka REST proxy

Question asked by thbeh on Jan 16, 2017
Latest reply on Mar 1, 2017 by catherine_s

Hi, I am testing kafka-rest proxy  (version that come as part of MapR) and am getting weird results. the following are how I posted & consume in curl.

 

Post to topic

[centos@node1 ~]$ curl -X POST -H "Content-type: application/vnd.kafka.binary.v1+json" --data '{ "records":[{ "value":"Manages nodes in the cluster" }] }' http://192.168.20.201:8082/topics/%2Fsample-stream%3Asensor
{"offsets":[{"partition":1,"offset":5,"error_code":null,"error":null}],"key_schema_id":null,"value_schema_id":null}

 

Consume
[centos@node1 ~]$ curl -X GET -H "Accept: application/vnd.kafka.binary.v1+json" http://node1:8082/consumers/
my_json_consumer/instances/user/topics/%2Fsample-stream%3Asensor
[{"key":null,"value":"Managesnodesinthecluster","topic":"/sample-stream:sensor","partition":1,"offset":5}][centos@node1 ~]$

 

Notice the missing space in the value? Please advice.

Thanks

Outcomes