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 :
- Connect to GCS
- Read the file specified in args , bucketname and filename to be provided
- Read every line of the file
- Submit the lineRead to PubSub , specify the pubsub topic in args.
This project can be executed as follows :
- Clone the repo.
- Build the project
mvn clean install
- 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.