项目作者: gt2985

项目描述 :
GCP, Google Cloud Platform, helper examples, read from gcs and send to pub/sub
高级语言: Java
项目地址: git://github.com/gt2985/simulate-events.git
创建时间: 2018-02-05T02:10:06Z
项目社区:https://github.com/gt2985/simulate-events

开源协议:

下载


Open in Cloud Shell

Simple Project showing the capability of reading a GCS file.
It also includes a simple GCP Pub/Sub publisher

This progam includes a main program that does the following :

  1. Connect to GCS
  2. Read the file specified in args , bucketname and filename to be provided
  3. Read every line of the file
  4. Submit the lineRead to PubSub , specify the pubsub topic in args.

This project can be executed as follows :

  1. Clone the repo.
  2. Build the project
    mvn clean install
  3. Execute the main class
    mvn exec:java -Dexec.args=”[projectname] [bucketname] [filename] [topicname]”

You would be able to see sysouts diplaying the read data on the console.