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/07/19 12:52:06 UTC

[camel-k-examples] branch main updated (ab36b12 -> 7e37edc)

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

acosentino pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k-examples.git.


    from ab36b12  Kamelets: Added an example for kafka to kafka with regex router action
     new 86e965f  Added a Kafka to Kafka example with manual commit
     new 12202be  Added a Kafka to Kafka example with manual commit
     new 7e37edc  Added a Kafka to Kafka example with manual commit

The 3 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:
 kamelets/README.md                                 |  1 +
 .../kafka-to-kafka-with-manual-commit/README.md    | 16 ++++++++++++++
 .../flow-binding.yaml                              | 25 +++++++++++-----------
 .../log-sink.kamelet.yaml                          |  0
 4 files changed, 29 insertions(+), 13 deletions(-)
 create mode 100644 kamelets/kafka-to-kafka-with-manual-commit/README.md
 copy kamelets/{kafka-to-kafka-with-regex-router => kafka-to-kafka-with-manual-commit}/flow-binding.yaml (70%)
 copy kamelets/{kafka-to-kafka-with-regex-router => kafka-to-kafka-with-manual-commit}/log-sink.kamelet.yaml (100%)

[camel-k-examples] 01/03: Added a Kafka to Kafka example with manual commit

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

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k-examples.git

commit 86e965f2cabb155a49b7c95f648859edbb14c777
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jul 19 14:46:54 2021 +0200

    Added a Kafka to Kafka example with manual commit
---
 .../kafka-to-kafka-with-manual-commit/README.md    | 15 +++++++++
 .../flow-binding.yaml                              | 36 ++++++++++++++++++++++
 .../log-sink.kamelet.yaml                          | 22 +++++++++++++
 3 files changed, 73 insertions(+)

diff --git a/kamelets/kafka-to-kafka-with-manual-commit/README.md b/kamelets/kafka-to-kafka-with-manual-commit/README.md
new file mode 100644
index 0000000..5ac06bc
--- /dev/null
+++ b/kamelets/kafka-to-kafka-with-manual-commit/README.md
@@ -0,0 +1,15 @@
+# Kafka to Kafka with manual commit
+
+- Use the quickstart for https://strimzi.io/quickstarts/ and follow the minikube guide.
+
+- Install camel-k on the kafka namespace
+
+- Run the following commands
+
+kubectl apply -f kafka-not-secured-source.kamelet.yaml -n kafka
+kubectl apply -f log-sink.kamelet.yaml -n kafka
+kubectl apply -f flow-binding.yaml -n kafka
+
+- Check logs
+
+kamel logs kafka-to-kafka-with-manual-commit -n kafka
diff --git a/kamelets/kafka-to-kafka-with-manual-commit/flow-binding.yaml b/kamelets/kafka-to-kafka-with-manual-commit/flow-binding.yaml
new file mode 100644
index 0000000..0cc75b6
--- /dev/null
+++ b/kamelets/kafka-to-kafka-with-manual-commit/flow-binding.yaml
@@ -0,0 +1,36 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: kafka-to-log-with-manual-commit
+spec:
+  integration:
+    configuration:
+      - type: property
+        value: "quarkus.log.level=DEBUG"
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: kafka-not-secured-source
+    properties:
+      brokers: 'my-cluster-kafka-bootstrap:9092'
+      topic: 'test-topic-1'
+      autoCommitEnable: false
+      allowManualCommit: true
+  steps:
+  - ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: kafka-not-secured-sink
+    properties:
+      brokers: 'my-cluster-kafka-bootstrap:9092'
+      topic: 'test-topic-2'
+  - ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: kafka-manual-commit-action
+  sink:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: log-sink
diff --git a/kamelets/kafka-to-kafka-with-manual-commit/log-sink.kamelet.yaml b/kamelets/kafka-to-kafka-with-manual-commit/log-sink.kamelet.yaml
new file mode 100755
index 0000000..a48fb41
--- /dev/null
+++ b/kamelets/kafka-to-kafka-with-manual-commit/log-sink.kamelet.yaml
@@ -0,0 +1,22 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: log-sink
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNDAgMjQwIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSIuNjY3IiB4Mj0iLjQxNyIgeTE9Ii4xNjciIHkyPSIuNzUiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzM3YWVlMiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzFlOTZjOCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJiIiB4MT0iLjY2IiB4Mj0iLjg1MSIgeTE9Ii40MzciIHkyPSIuODAyIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNlZmY3Zm [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+    camel.apache.org/kamelet.group: "Log"
+spec:
+  definition:
+    title: "Log Sink"
+    description: |-
+      Log something
+    type: object
+  flow:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - to:
+          uri: "log:info?showAll=true"

[camel-k-examples] 02/03: Added a Kafka to Kafka example with manual commit

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

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k-examples.git

commit 12202be8b98e601f64fe1fe0fd7e89b0f21acc73
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jul 19 14:49:53 2021 +0200

    Added a Kafka to Kafka example with manual commit
---
 kamelets/kafka-to-kafka-with-manual-commit/README.md | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/kamelets/kafka-to-kafka-with-manual-commit/README.md b/kamelets/kafka-to-kafka-with-manual-commit/README.md
index 5ac06bc..a9a5245 100644
--- a/kamelets/kafka-to-kafka-with-manual-commit/README.md
+++ b/kamelets/kafka-to-kafka-with-manual-commit/README.md
@@ -2,13 +2,14 @@
 
 - Use the quickstart for https://strimzi.io/quickstarts/ and follow the minikube guide.
 
+- The Log Sink Kamelet is not available out of the box in 1.5.0 Camel-K release so you'll have to install it before installing the flow binding.
+
 - Install camel-k on the kafka namespace
 
 - Run the following commands
 
-kubectl apply -f kafka-not-secured-source.kamelet.yaml -n kafka
-kubectl apply -f log-sink.kamelet.yaml -n kafka
-kubectl apply -f flow-binding.yaml -n kafka
+  - kubectl apply -f log-sink.kamelet.yaml -n kafka
+  - kubectl apply -f flow-binding.yaml -n kafka
 
 - Check logs
 

[camel-k-examples] 03/03: Added a Kafka to Kafka example with manual commit

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

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k-examples.git

commit 7e37edc855cfbb4e3d7c286578fe66c087f8eb35
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jul 19 14:51:10 2021 +0200

    Added a Kafka to Kafka example with manual commit
---
 kamelets/README.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kamelets/README.md b/kamelets/README.md
index d42cd4a..65937b9 100644
--- a/kamelets/README.md
+++ b/kamelets/README.md
@@ -15,3 +15,4 @@ All the Kamelet examples in this folder have been tested on Camel-K 1.5.0.
 - [AWS S3 to Log](./aws-s3-to-log): Create a Kamelet binding between an AWS S3 Source Kamelet and a Log Sink Kamelet
 - [AWS S3 to Kafka with Timestamp router](./aws-s3-to-kafka-with-timestamp-router): Create a Kamelet binding between an AWS S3 Source Kamelet and a Kafka Sink Kamelet, with the usage of the Timestamp Router Action.
 - [Kafka to Kafka with Regex router](./kafka-to-kafka-with-regex-router): Create a Kamelet binding between a Kafka Source Kamelet and a Kafka Sink Kamelet, with the usage of the Regex Router Action.
+- [Kafka to Kafka with Manual commit](./kafka-to-kafka-with-manual-commit): Create a Kamelet binding between a Kafka Source Kamelet and a Kafka Sink Kamelet, with the usage of the Manual Commit Action.