You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by df...@apache.org on 2021/04/20 18:16:58 UTC

[camel-examples] 22/35: Camel-AWS S3 Streaming upload: Use useDefaultCredentialProvider

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

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

commit 4e424a7320d374ea27119b06013085738e2fc8b3
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Apr 13 14:49:12 2021 +0200

    Camel-AWS S3 Streaming upload: Use useDefaultCredentialProvider
---
 .../src/main/java/org/apache/camel/example/MyRouteBuilder.java         | 2 +-
 .../src/main/resources/application.properties                          | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/examples/aws/main-endpointdsl-kafka-aws2-s3-restarting-policy/src/main/java/org/apache/camel/example/MyRouteBuilder.java b/examples/aws/main-endpointdsl-kafka-aws2-s3-restarting-policy/src/main/java/org/apache/camel/example/MyRouteBuilder.java
index 29f739e..a3ed90d 100644
--- a/examples/aws/main-endpointdsl-kafka-aws2-s3-restarting-policy/src/main/java/org/apache/camel/example/MyRouteBuilder.java
+++ b/examples/aws/main-endpointdsl-kafka-aws2-s3-restarting-policy/src/main/java/org/apache/camel/example/MyRouteBuilder.java
@@ -28,6 +28,6 @@ public class MyRouteBuilder extends EndpointRouteBuilder {
         
         from(kafka("{{kafkaTopic1}}").brokers("{{kafkaBrokers}}"))
               .log("Kafka Message is: ${body}")
-              .toD(aws2S3("{{bucketName}}").streamingUploadMode(true).restartingPolicy(AWS2S3EndpointBuilderFactory.AWSS3RestartingPolicyEnum.lastPart).batchMessageNumber(25).namingStrategy(AWS2S3EndpointBuilderFactory.AWSS3NamingStrategyEnum.progressive).keyName("{{kafkaTopic1}}/partition_${headers.kafka.PARTITION}/{{kafkaTopic1}}.txt"));
+              .toD(aws2S3("{{bucketName}}").streamingUploadMode(true).useDefaultCredentialsProvider(true).restartingPolicy(AWS2S3EndpointBuilderFactory.AWSS3RestartingPolicyEnum.lastPart).batchMessageNumber(25).namingStrategy(AWS2S3EndpointBuilderFactory.AWSS3NamingStrategyEnum.progressive).keyName("{{kafkaTopic1}}/partition_${headers.kafka.PARTITION}/{{kafkaTopic1}}.txt"));
     }
 }
diff --git a/examples/aws/main-endpointdsl-kafka-aws2-s3-restarting-policy/src/main/resources/application.properties b/examples/aws/main-endpointdsl-kafka-aws2-s3-restarting-policy/src/main/resources/application.properties
index 9a68e03..1bf3df7 100644
--- a/examples/aws/main-endpointdsl-kafka-aws2-s3-restarting-policy/src/main/resources/application.properties
+++ b/examples/aws/main-endpointdsl-kafka-aws2-s3-restarting-policy/src/main/resources/application.properties
@@ -20,9 +20,6 @@
 camel.main.name = Kafka-to-AWS2-S3-Stream
 
 # properties used in the route
-camel.component.aws2-s3.accessKey=xxxxx
-camel.component.aws2-s3.secretKey=yyyyy
-camel.component.aws2-s3.region=region
 bucketName=camel-1
 
 kafkaTopic1=s3.topic.1