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

[camel-kamelets] branch master updated (f4ab965 -> ffd0426)

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

nferraro pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git.


    from f4ab965  Fix #18: add mail source kamelet
     new 2f27d58  Added Kafka Source kamelet
     new ffd0426  Added Kafka Source Kamelet

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../ROOT/assets/images/kamelets/kafka-source.svg   | 19 ++++++++++
 docs/modules/ROOT/nav.adoc                         |  1 +
 .../pages/{timer-source.adoc => kafka-source.adoc} | 27 ++++++++-------
 kafka-source.kamelet.yaml                          | 40 ++++++++++++++++++++++
 4 files changed, 74 insertions(+), 13 deletions(-)
 create mode 100644 docs/modules/ROOT/assets/images/kamelets/kafka-source.svg
 copy docs/modules/ROOT/pages/{timer-source.adoc => kafka-source.adoc} (61%)
 create mode 100644 kafka-source.kamelet.yaml


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

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ffd042639b4c7bde4e3d95e6a2ef32b59fd5131f
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


[camel-kamelets] 01/02: Added Kafka Source kamelet

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 2f27d589968642047c383e5dc616fbe4d1bb271b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Mar 1 15:16:57 2021 +0100

    Added Kafka Source kamelet
---
 kafka-source.kamelet.yaml | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/kafka-source.kamelet.yaml b/kafka-source.kamelet.yaml
new file mode 100644
index 0000000..3baf168
--- /dev/null
+++ b/kafka-source.kamelet.yaml
@@ -0,0 +1,40 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: kafka-source
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MD [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Kafka Source"
+    description: |-
+      Receive data from Kafka topics.
+    required:
+      - topic
+      - brokers
+    properties:
+      topic:
+        title: Topic names
+        description: Comma separated list of Kafka topic names
+        type: string
+      brokers:
+        title: Brokers
+        description: Comma separated list of Kafka Broker URLs
+        type: string
+  types:
+    out:
+      mediaType: application/json
+  dependencies:
+  - "camel:jackson"
+  flow:
+    from:
+      uri: "kafka:{{topic}}"
+      parameters:
+        brokers: "{{brokers}}"
+      steps:
+      - marshal:
+          json: {}
+      - to: "kamelet:sink"