Also see https://github.com/confluentinc/kafka-rest-node for an example JavaScript wrapper on the Confluent REST Proxy.
You definitely do not have to use Kafka Connect to pub/sub to Kafka via REST. -hans > On Dec 15, 2016, at 11:17 AM, Stevo Slavić <ssla...@gmail.com> wrote: > > https://github.com/confluentinc/kafka-rest > > On Thu, Dec 15, 2016 at 8:12 PM, Gautham Kumaran < > gautham.kumara...@gmail.com> wrote: > >> Hi Everyone, >> >> I'm trying to learn Kafka. So this might be basic :) >> >> I've come across the following API call to a kafka topic directly, but I >> was under the impression that a connector API is needed to access a topic >> through the REST API. >> >> >> Index.html >> >> // Call the Kafka Rest Api >> $.ajax({ >> url:'/item-rating-kafka', >> type:'POST', >> data:'{"records":[{"key":"' + encodedKey + '", "value":"' + encodedValue + >> ' >> "}]}', >> contentType:'application/vnd.kafka.binary.v1+json', >> dataType:'json', >> success: function(data, status){ >> //NoOp >> } >> }) >> } >> >> >> Sparkafterdark.conf >> <https://github.com/fluxcapacitor/pipeline/blob/ >> master/web.ml/sparkafterdark/config/sparkafterdark.conf> >> >> # Kafka Proxies >> <Location /topics> >> ProxyPass http://127.0.0.1:6042/topics >> Require all granted >> </Location> >> <Location /item-rating-kafka> >> ProxyPass http://127.0.0.1:6042/topics/item_ratings >> Require all granted >> </Location> >> >> Any resource where I could explore more on kafka REST APIs in much >> appreciated. >> >> Regards, >> Gautham K >>