stn1slv commented on code in PR #13630:
URL: https://github.com/apache/camel/pull/13630#discussion_r1542457420


##########
components/camel-google/camel-google-pubsub-lite/.gitignore:
##########
@@ -0,0 +1,7 @@
+.idea

Review Comment:
   Fixed in 8bfe10f



##########
components/camel-google/camel-google-pubsub-lite/src/main/java/org/apache/camel/component/google/pubsublite/GooglePubsubLiteEndpoint.java:
##########
@@ -0,0 +1,238 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.google.pubsublite;
+
+import java.util.concurrent.ExecutorService;
+
+import org.apache.camel.*;
+import 
org.apache.camel.component.google.pubsublite.serializer.DefaultGooglePubsubSerializer;
+import 
org.apache.camel.component.google.pubsublite.serializer.GooglePubsubSerializer;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
+import org.apache.camel.support.DefaultEndpoint;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Send and receive messages to/from Google Cloud Platform PubSub Lite Service.
+ * <p/>
+ * Built on top of the Google Cloud Pub/Sub Lite libraries.
+ */
+@UriEndpoint(firstVersion = "4.5.0", scheme = "google-pubsub-lite", title = 
"Google Pubsub Lite",
+             syntax = "google-pubsub-lite:projectId:location:destinationName",
+             category = { Category.CLOUD, Category.MESSAGING },
+             headersClass = GooglePubsubLiteConstants.class)
+public class GooglePubsubLiteEndpoint extends DefaultEndpoint {
+
+    private Logger log;
+
+    @UriPath(label = "common", description = "The Google Cloud PubSub Lite 
Project Id")
+    @Metadata(required = true)
+    private Long projectId;
+
+    @UriPath(label = "common", description = "The Google Cloud PubSub Lite 
location")
+    @Metadata(required = true)
+    private String location;
+
+    @UriPath(label = "common",
+             description = "The Destination Name. For the consumer this will 
be the subscription name, while for the producer this will be the topic name.")
+    @Metadata(required = true)
+    private String destinationName;
+
+    @UriParam(label = "common",
+              description = "The Service account key that can be used as 
credentials for the PubSub publisher/subscriber. It can be loaded by default 
from "
+                            + " classpath, but you can prefix with classpath:, 
file:, or http: to load the resource from different systems.")
+    private String serviceAccountKey;
+
+    @UriParam(name = "loggerId", description = "Logger ID to use when a match 
to the parent route required")
+    private String loggerId;
+
+    @UriParam(label = "consumer", name = "concurrentConsumers",
+              description = "The number of parallel streams consuming from the 
subscription",
+              defaultValue = "1")
+    private Integer concurrentConsumers = 1;
+
+    @UriParam(label = "consumer", name = "maxMessagesPerPoll",
+              description = "The max number of messages to receive from the 
server in a single API call", defaultValue = "1")
+    private Integer maxMessagesPerPoll = 1;
+
+    @UriParam(label = "consumer", defaultValue = "AUTO", enums = "AUTO,NONE",
+              description = "AUTO = exchange gets ack'ed/nack'ed on 
completion. NONE = downstream process has to ack/nack explicitly")
+    private GooglePubsubLiteConstants.AckMode ackMode = 
GooglePubsubLiteConstants.AckMode.AUTO;
+
+    @UriParam(label = "consumer", name = "maxAckExtensionPeriod",
+              description = "Set the maximum period a message ack deadline 
will be extended. Value in seconds",
+              defaultValue = "3600")
+    private int maxAckExtensionPeriod = 3600;
+
+    @UriParam(description = "Pub/Sub endpoint to use. Required when using 
message ordering, and ensures that messages are received in order even when 
multiple publishers are used",
+              label = "producer,advanced")
+    private String pubsubEndpoint;
+
+    @UriParam(name = "serializer",
+              description = "A custom GooglePubsubLiteSerializer to use for 
serializing message payloads in the producer",
+              label = "producer,advanced")
+    @Metadata(autowired = true)
+    private GooglePubsubSerializer serializer;
+
+    public GooglePubsubLiteEndpoint(String uri, Component component) {
+        super(uri, component);
+
+        if (!(component instanceof GooglePubsubLiteComponent)) {

Review Comment:
   Fixed in 8bfe10f



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to