kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@confluent.io
Subject Re: REST API to kafka topic
Date Thu, 15 Dec 2016 20:16:19 GMT
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ć <sslavic@gmail.com> wrote:
> 
> https://github.com/confluentinc/kafka-rest
> 
> On Thu, Dec 15, 2016 at 8:12 PM, Gautham Kumaran <
> gautham.kumaran11@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
>> 

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message