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 2024/02/16 11:05:12 UTC
(camel-kamelets-examples) branch kafka-batch-s3 created (now 8db125e)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch kafka-batch-s3
in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git
at 8db125e Modified the example of Kafka Batch to s3 a little
This branch includes the following new commits:
new 35ca171 Modified the example of Kafka Batch to s3 a little
new 5858798 Modified the example of Kafka Batch to s3 a little
new 8db125e Modified the example of Kafka Batch to s3 a little
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.
(camel-kamelets-examples) 01/03: Modified the example of Kafka Batch to s3 a little
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch kafka-batch-s3
in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git
commit 35ca1719cc9a28a927e6b07ac872615bb5e73a28
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Feb 16 12:03:04 2024 +0100
Modified the example of Kafka Batch to s3 a little
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
jbang/kafka-batch-s3/kafka-batch-log.yaml | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/jbang/kafka-batch-s3/kafka-batch-log.yaml b/jbang/kafka-batch-s3/kafka-batch-log.yaml
index a1e4e6d..8db16e4 100644
--- a/jbang/kafka-batch-s3/kafka-batch-log.yaml
+++ b/jbang/kafka-batch-s3/kafka-batch-log.yaml
@@ -35,13 +35,9 @@
- split:
simple: "${body}"
steps:
- - setHeaders:
- headers:
- - name: "kafka.TOPIC"
- simple: "${body.getMessage().getHeader('kafka.TOPIC')}"
- setHeader:
name: "file"
- simple: "${headers[kafka.TOPIC]}-${date:now:yyyyMMddHHmmssSSS}.txt"
+ simple: "${body.getMessage().getHeader('kafka.TOPIC')}-${date:now:yyyyMMddHHmmssSSS}.txt"
- setBody:
simple: "${body.getMessage().getBody()}"
- to:
(camel-kamelets-examples) 03/03: Modified the example of Kafka Batch to s3 a little
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch kafka-batch-s3
in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git
commit 8db125e976ba03d4f7d354e57a17b3264f46e540
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Feb 16 12:04:47 2024 +0100
Modified the example of Kafka Batch to s3 a little
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
jbang/kafka-batch-s3/kafka-batch-s3.yaml | 50 ++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/jbang/kafka-batch-s3/kafka-batch-s3.yaml b/jbang/kafka-batch-s3/kafka-batch-s3.yaml
new file mode 100644
index 0000000..8db16e4
--- /dev/null
+++ b/jbang/kafka-batch-s3/kafka-batch-s3.yaml
@@ -0,0 +1,50 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# camel-k: dependency=camel:kafka
+
+- route:
+ id: "kafka-to-log"
+ from:
+ uri: "kamelet:kafka-batch-not-secured-source"
+ parameters:
+ bootstrapServers: "localhost:9092"
+ topic: "test-topic"
+ consumerGroup: 'my-group'
+ batchSize: 10
+ pollTimeout: 40000
+ maxPollIntervalMs: 60000
+ autoCommitEnable: false
+ allowManualCommit: true
+ deserializeHeaders: true
+ steps:
+ - split:
+ simple: "${body}"
+ steps:
+ - setHeader:
+ name: "file"
+ simple: "${body.getMessage().getHeader('kafka.TOPIC')}-${date:now:yyyyMMddHHmmssSSS}.txt"
+ - setBody:
+ simple: "${body.getMessage().getBody()}"
+ - to:
+ uri: "kamelet:aws-s3-sink"
+ parameters:
+ useDefaultCredentialsProvider: true
+ region: "eu-west-1"
+ bucketNameOrArn: kamelets-demo
+ - to:
+ uri: "kamelet:kafka-batch-manual-commit-action"
(camel-kamelets-examples) 02/03: Modified the example of Kafka Batch to s3 a little
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch kafka-batch-s3
in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git
commit 5858798d7ab03b4d5893e0162fb1c152d19bb9ea
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Feb 16 12:04:01 2024 +0100
Modified the example of Kafka Batch to s3 a little
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
jbang/kafka-batch-s3/README.adoc | 2 +-
jbang/kafka-batch-s3/kafka-batch-log.yaml | 50 -------------------------------
2 files changed, 1 insertion(+), 51 deletions(-)
diff --git a/jbang/kafka-batch-s3/README.adoc b/jbang/kafka-batch-s3/README.adoc
index 12d1a5b..2e51747 100644
--- a/jbang/kafka-batch-s3/README.adoc
+++ b/jbang/kafka-batch-s3/README.adoc
@@ -79,7 +79,7 @@ You should see:
2024-02-16 10:19:47.357 INFO 17500 --- [ main] el.impl.engine.AbstractCamelContext : Started kafka-batch-not-secured-source-1 (kafka://test-topic)
2024-02-16 10:19:47.358 INFO 17500 --- [ main] el.impl.engine.AbstractCamelContext : Started aws-s3-sink-2 (kamelet://source)
2024-02-16 10:19:47.358 INFO 17500 --- [ main] el.impl.engine.AbstractCamelContext : Started kafka-batch-manual-commit-action-3 (kamelet://source)
-2024-02-16 10:19:47.358 INFO 17500 --- [ main] el.impl.engine.AbstractCamelContext : Apache Camel 4.4.0-SNAPSHOT (kafka-batch-log) started in 1s244ms (build:0ms init:0ms start:1s244ms)
+2024-02-16 10:19:47.358 INFO 17500 --- [ main] el.impl.engine.AbstractCamelContext : Apache Camel 4.4.0-SNAPSHOT (kafka-batch-s3) started in 1s244ms (build:0ms init:0ms start:1s244ms)
2024-02-16 10:19:47.418 INFO 17500 --- [mer[test-topic]] he.kafka.common.utils.AppInfoParser : Kafka version: 3.6.1
2024-02-16 10:19:47.418 INFO 17500 --- [mer[test-topic]] he.kafka.common.utils.AppInfoParser : Kafka commitId: 5e3c2b738d253ff5
2024-02-16 10:19:47.419 INFO 17500 --- [mer[test-topic]] he.kafka.common.utils.AppInfoParser : Kafka startTimeMs: 1708075187417
diff --git a/jbang/kafka-batch-s3/kafka-batch-log.yaml b/jbang/kafka-batch-s3/kafka-batch-log.yaml
deleted file mode 100644
index 8db16e4..0000000
--- a/jbang/kafka-batch-s3/kafka-batch-log.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-# camel-k: dependency=camel:kafka
-
-- route:
- id: "kafka-to-log"
- from:
- uri: "kamelet:kafka-batch-not-secured-source"
- parameters:
- bootstrapServers: "localhost:9092"
- topic: "test-topic"
- consumerGroup: 'my-group'
- batchSize: 10
- pollTimeout: 40000
- maxPollIntervalMs: 60000
- autoCommitEnable: false
- allowManualCommit: true
- deserializeHeaders: true
- steps:
- - split:
- simple: "${body}"
- steps:
- - setHeader:
- name: "file"
- simple: "${body.getMessage().getHeader('kafka.TOPIC')}-${date:now:yyyyMMddHHmmssSSS}.txt"
- - setBody:
- simple: "${body.getMessage().getBody()}"
- - to:
- uri: "kamelet:aws-s3-sink"
- parameters:
- useDefaultCredentialsProvider: true
- region: "eu-west-1"
- bucketNameOrArn: kamelets-demo
- - to:
- uri: "kamelet:kafka-batch-manual-commit-action"