[
https://issues.apache.org/jira/browse/BEAM-11065?focusedWorklogId=522340&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-522340
]
ASF GitHub Bot logged work on BEAM-11065:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Dec/20 16:58
Start Date: 09/Dec/20 16:58
Worklog Time Spent: 10m
Work Description: KhaninArtur commented on a change in pull request
#13112:
URL: https://github.com/apache/beam/pull/13112#discussion_r539479623
##########
File path: examples/kafka-to-pubsub/README.md
##########
@@ -0,0 +1,163 @@
+<!--
+ 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.
+-->
+
+# Apache Beam pipeline example to ingest data from Apache Kafka to Google
Cloud Pub/Sub
+
+This directory contains an [Apache Beam](https://beam.apache.org/) pipeline
example that creates a pipeline
+to read data from a single or multiple topics from
+[Apache Kafka](https://kafka.apache.org/) and write data into a single topic
+in [Google Cloud Pub/Sub](https://cloud.google.com/pubsub).
+
+Supported data formats:
+- Serializable plaintext formats, such as JSON
+-
[PubSubMessage](https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage).
+
+Supported input source configurations:
+- Single or multiple Apache Kafka bootstrap servers
+- Apache Kafka SASL/SCRAM authentication over plaintext or SSL connection
+- Secrets vault service [HashiCorp Vault](https://www.vaultproject.io/).
+
+Supported destination configuration:
+- Single Google Cloud Pub/Sub topic.
+
+In a simple scenario, the example will create an Apache Beam pipeline that
will read messages from a source Kafka server with a source topic, and stream
the text messages into specified Pub/Sub destination topic. Other scenarios may
need Kafka SASL/SCRAM authentication, that can be performed over plain text or
SSL encrypted connection. The example supports using a single Kafka user
account to authenticate in the provided source Kafka servers and topics. To
support SASL authenticaton over SSL the example will need an SSL certificate
location and access to a secrets vault service with Kafka username and
password, currently supporting HashiCorp Vault.
+
+## Requirements
+
+- Java 8
+- Kafka Bootstrap Server(s) up and running
+- Existing source Kafka topic(s)
+- An existing Pub/Sub destination output topic
+- (Optional) An existing HashiCorp Vault
+- (Optional) A configured secure SSL connection for Kafka
+
+## Getting Started
+
+This section describes what is needed to get the exaple up and running.
+- Assembling the Uber-JAR
+- Local execution
+- Google Dataflow Template
+ - Set up the environment
+ - Creating the Dataflow Flex Template
+ - Create a Dataflow job to ingest data using the template
+- Avro format transferring.
+- E2E tests (TBD)
+
+## Assembling the Uber-JAR
+
+To run this example the Java project should be built into
+an Uber JAR file.
+
+Navigate to the Beam folder:
+
+```
+cd /path/to/beam
+```
+
+In order to create Uber JAR with Gradle, [Shadow
plugin](https://github.com/johnrengelman/shadow)
+is used. It creates the `shadowJar` task that builds the Uber JAR:
+
+```
+./gradlew -p examples/kafka-to-pubsub clean shadowJar
+```
+
+ℹ️ An **Uber JAR** - also known as **fat JAR** - is a single JAR file that
contains
+both target package *and* all its dependencies.
+
+The result of the `shadowJar` task execution is a `.jar` file that is generated
+under the `build/libs/` folder in kafka-to-pubsub directory.
+
+## Local execution
Review comment:
Renamed both sections
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 522340)
Time Spent: 6h 20m (was: 6h 10m)
> Apache Beam Template to ingest from Apache Kafka to Google Pub/Sub
> ------------------------------------------------------------------
>
> Key: BEAM-11065
> URL: https://issues.apache.org/jira/browse/BEAM-11065
> Project: Beam
> Issue Type: Improvement
> Components: examples-java
> Reporter: Ilya Kozyrev
> Assignee: Ilya Kozyrev
> Priority: P3
> Labels: Clarified
> Time Spent: 6h 20m
> Remaining Estimate: 0h
>
> In the Beam repository, we have awesome examples on java and python, however,
> there are not presented any templates.
> The reason for templates here, some users would like to use parametrized flex
> templates for common use cases. For example, if I want to do a typical
> pipeline, read from some source, and write to another source, I would happy
> if Beam provides a finally implemented pipeline for my common case in which I
> can put only parameters to customize input and output sources.
> I propose to add the new directory under the examples folder and name it
> "templates". It will be a new Gradle module in the project. As a first
> template, I propose to implement Kafka to Pubsub template.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)