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/04 08:52:57 UTC

[camel-examples] branch master updated: Camel-Google-pubsub Example: Set serviceAccountKey at component level

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5be8af1  Camel-Google-pubsub Example: Set serviceAccountKey at component level
5be8af1 is described below

commit 5be8af156764e0046aa3bddf0f1b23306ad9870e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Mar 4 09:52:22 2021 +0100

    Camel-Google-pubsub Example: Set serviceAccountKey at component level
---
 .../src/main/java/org/apache/camel/example/MyRouteBuilder.java        | 4 ++--
 .../src/main/resources/application.properties                         | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/main-endpointdsl-google-pubsub/src/main/java/org/apache/camel/example/MyRouteBuilder.java b/examples/main-endpointdsl-google-pubsub/src/main/java/org/apache/camel/example/MyRouteBuilder.java
index 1b995a1..d6c6912 100644
--- a/examples/main-endpointdsl-google-pubsub/src/main/java/org/apache/camel/example/MyRouteBuilder.java
+++ b/examples/main-endpointdsl-google-pubsub/src/main/java/org/apache/camel/example/MyRouteBuilder.java
@@ -29,9 +29,9 @@ public class MyRouteBuilder extends EndpointRouteBuilder {
         // here we configure the time and bean endpoint
 
         from(timer("tick").repeatCount(5)).setBody(constant("Test"))
-            .to(googlePubsub("{{pubsubProjectId}}:{{pubsubTopicName}}").serviceAccountKey("{{pubsubServiceAccount}}")).startupOrder(2);
+            .to(googlePubsub("{{pubsubProjectId}}:{{pubsubTopicName}}")).startupOrder(2);
         
-        from(googlePubsub("{{pubsubProjectId}}:{{pubsubSubscriptionName}}").synchronousPull(true).serviceAccountKey("{{pubsubServiceAccount}}"))
+        from(googlePubsub("{{pubsubProjectId}}:{{pubsubSubscriptionName}}").synchronousPull(true))
             .log("From Pubsub Subscription: ${body}").startupOrder(1);
     }
 }
diff --git a/examples/main-endpointdsl-google-pubsub/src/main/resources/application.properties b/examples/main-endpointdsl-google-pubsub/src/main/resources/application.properties
index e61284d..1eac0d5 100644
--- a/examples/main-endpointdsl-google-pubsub/src/main/resources/application.properties
+++ b/examples/main-endpointdsl-google-pubsub/src/main/resources/application.properties
@@ -30,10 +30,10 @@ camel.main.name = Camel-google-pubsub
 
 # properties used in the route
 myPeriod = 1000
-pubsubServiceAccount = <service_account>
+camel.component.google.pubsub.serviceAccounKey= <serviceAccountKey>
 pubsubProjectId = <projectId>
 pubsubTopicName = <topicName>
-pubsubSubscriptionName = <SubscriptionName>
+pubsubSubscriptionName = <subscriptionName>