gt2985 / simulate-events

GCP, Google Cloud Platform, helper examples, read from gcs and send to pub/sub

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

GCP, Google Cloud Platform, helper examples, read from gcs and send to pub/sub


Languages

Language:Java 100.0%