knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r1798651 - /knox/trunk/books/0.13.0/service_kafka.md
Date Wed, 14 Jun 2017 01:51:16 GMT
Author: more
Date: Wed Jun 14 01:51:16 2017
New Revision: 1798651

URL: http://svn.apache.org/viewvc?rev=1798651&view=rev
Log:
KNOX-768 - Apache Kafka REST API Support - add missing file (Rick Kellogg via Sandeep More)

Added:
    knox/trunk/books/0.13.0/service_kafka.md

Added: knox/trunk/books/0.13.0/service_kafka.md
URL: http://svn.apache.org/viewvc/knox/trunk/books/0.13.0/service_kafka.md?rev=1798651&view=auto
==============================================================================
--- knox/trunk/books/0.13.0/service_kafka.md (added)
+++ knox/trunk/books/0.13.0/service_kafka.md Wed Jun 14 01:51:16 2017
@@ -0,0 +1,58 @@
+<!---
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+--->
+
+### Kafka ###
+
+Knox provides gateway functionality to Kafka when used with the Confluent Kafka REST Proxy.
The Kafka REST APIs allow the user to view the status 
+of the cluster, perform administrative actions and produce messages.
+
+<p>Note: Consumption of messages via Knox at this time is not supported.</p>
 
+
+The docs for the Confluent Kafka REST Proxy can be found here:
+http://docs.confluent.io/current/kafka-rest/docs/index.html
+
+To enable this functionality, a topology file needs to have the following configuration:
+
+    <service>
+        <role>KAFKA</role>
+        <url>http://<kafka-rest-host>:<kafka-rest-port></url>
+    </service>
+
+The default Kafka REST Proxy port is 8082. If it is configured to some other port, that configuration
can be found in 
+`kafka-rest.properties` under the property `listeners`.
+
+#### Kafka URL Mapping ####
+
+For Kafka URLs, the mapping of Knox Gateway accessible URLs to direct Kafka URLs is the following.
+
+| ------- | -------------------------------------------------------------------------------------
|
+| Gateway | `https://{gateway-host}:{gateway-port}/{gateway-path}/{cluster-name}/kafka` |
+| Cluster | `http://{kakfa-rest-host}:{kafka-rest-port}}`                               |
+
+
+#### Kafka Examples via cURL
+
+Some of the various calls that can be made and examples using curl are listed below.
+
+    # 0. Getting topic info
+    
+	curl -ikv -u guest:guest-password -X GET 'https://localhost:8443/gateway/sandbox/kafka/topics'
+
+    # 1. Publish message to topic
+    
+	curl -ikv -u guest:guest-password -X POST 'https://localhost:8443/gateway/sandbox/kafka/topics/TOPIC1'
-H 'Content-Type: application/vnd.kafka.json.v2+json' -H 'Accept: application/vnd.kafka.v2+json'
--data '"records":[{"value":{"foo":"bar"}}]}'
+



Mime
View raw message