You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/03/01 14:17:56 UTC

[camel-kamelets] 02/02: Added Kafka Source Kamelet

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch kafka-source
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit da04bd98b4d23cddd3dd2cce70f436a6c5b65ec3
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Mar 1 15:17:33 2021 +0100

    Added Kafka Source Kamelet
---
 .../ROOT/assets/images/kamelets/kafka-source.svg   | 19 +++++++
 docs/modules/ROOT/nav.adoc                         |  1 +
 docs/modules/ROOT/pages/kafka-source.adoc          | 62 ++++++++++++++++++++++
 3 files changed, 82 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/kafka-source.svg b/docs/modules/ROOT/assets/images/kamelets/kafka-source.svg
new file mode 100644
index 0000000..9d0e127
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/kafka-source.svg
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 500 500" style="enable-background:new 0 0 500 500;" xml:space="preserve">
+<g id="XMLID_1_">
+	<path id="XMLID_9_" d="M314.8,269.7c-14.2,0-27,6.3-35.7,16.2L256.8,270c2.4-6.5,3.7-13.6,3.7-20.9c0-7.2-1.3-14.1-3.6-20.6
+		l22.3-15.7c8.7,9.9,21.4,16.1,35.6,16.1c26.2,0,47.6-21.3,47.6-47.6s-21.3-47.6-47.6-47.6s-47.6,21.3-47.6,47.6
+		c0,4.7,0.7,9.2,2,13.5l-22.3,15.7c-9.3-11.6-22.8-19.6-38.1-22.1v-26.9c21.6-4.5,37.8-23.7,37.8-46.6c0-26.2-21.3-47.6-47.6-47.6
+		c-26.2,0-47.6,21.3-47.6,47.6c0,22.6,15.8,41.5,36.9,46.3v27.3c-28.8,5.1-50.8,30.2-50.8,60.5c0,30.4,22.2,55.7,51.2,60.5v28.8
+		c-21.3,4.7-37.4,23.7-37.4,46.4c0,26.2,21.3,47.6,47.6,47.6c26.2,0,47.6-21.3,47.6-47.6c0-22.7-16-41.8-37.4-46.4v-28.8
+		c15-2.5,28.2-10.4,37.4-21.8l22.5,15.9c-1.2,4.3-1.9,8.7-1.9,13.4c0,26.2,21.3,47.6,47.6,47.6s47.6-21.3,47.6-47.6
+		C362.4,291,341.1,269.7,314.8,269.7z M314.8,158.4c12.7,0,23.1,10.4,23.1,23.1c0,12.7-10.3,23.1-23.1,23.1s-23.1-10.4-23.1-23.1
+		C291.8,168.8,302.1,158.4,314.8,158.4z M176,115.1c0-12.7,10.3-23.1,23.1-23.1c12.7,0,23.1,10.4,23.1,23.1
+		c0,12.7-10.3,23.1-23.1,23.1C186.3,138.2,176,127.8,176,115.1z M222.1,384.9c0,12.7-10.3,23.1-23.1,23.1
+		c-12.7,0-23.1-10.4-23.1-23.1c0-12.7,10.3-23.1,23.1-23.1C211.8,361.8,222.1,372.2,222.1,384.9z M199.1,281.3
+		c-17.7,0-32.2-14.4-32.2-32.2c0-17.7,14.4-32.2,32.2-32.2c17.7,0,32.2,14.4,32.2,32.2C231.2,266.9,216.8,281.3,199.1,281.3z
+		 M314.8,340.3c-12.7,0-23.1-10.4-23.1-23.1c0-12.7,10.3-23.1,23.1-23.1s23.1,10.4,23.1,23.1C337.9,330,327.5,340.3,314.8,340.3z"/>
+</g>
+</svg>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 5c9e7c8..ac5f464 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -5,6 +5,7 @@
 * xref:ROOT:bitcoin-source.adoc[image:kamelets/bitcoin-source.svg[] Bitcoin Source]
 * xref:ROOT:http-source.adoc[image:kamelets/http-source.svg[] HTTP Source]
 * xref:ROOT:jira-source.adoc[image:kamelets/jira-source.svg[] Jira Source]
+* xref:ROOT:kafka-source.adoc[image:kamelets/kafka-source.svg[] Kafka Source]
 * xref:ROOT:mail-imap-source.adoc[image:kamelets/mail-imap-source.svg[] Mail IMAP Source]
 * xref:ROOT:minio-source.adoc[image:kamelets/minio-source.svg[] Minio Source]
 * xref:ROOT:mqtt-source.adoc[image:kamelets/mqtt-source.svg[] MQTT Source]
diff --git a/docs/modules/ROOT/pages/kafka-source.adoc b/docs/modules/ROOT/pages/kafka-source.adoc
new file mode 100644
index 0000000..5095592
--- /dev/null
+++ b/docs/modules/ROOT/pages/kafka-source.adoc
@@ -0,0 +1,62 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/kafka-source.svg[] Kafka Source
+
+*Provided by: "Apache Software Foundation"*
+
+Receive data from Kafka topics.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `kafka-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *brokers {empty}* *| Brokers| Comma separated list of Kafka Broker URLs| string| | 
+| *topic {empty}* *| Topic names| Comma separated list of Kafka topic names| string| | 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `kafka-source` can be used in various contexts.
+
+=== Knative Source
+
+The `kafka-source` Kamelet can be used as Knative source by binding it to a Knative object.
+
+.kafka-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: kafka-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: kafka-source
+    properties:
+      brokers: "The Brokers"
+      topic: "The Topic names"
+  sink:
+    ref:
+      kind: InMemoryChannel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+
+----
+
+Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
+
+Save the `kafka-source-binding.yaml` file into your hard drive, then configure it according to your needs.
+
+You can run the source using the following command:
+
+[source,shell]
+----
+kubectl apply -f kafka-source-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT