Google Cloud Pub/Sub is a fully-managed real-time messaging service that allows you to send and receive messages between independent applications. These sample Java applications demonstrate how to access the Pub/Sub API using the Google Cloud Client Library for Java.
Install Maven.
Build your project with:
mvn clean package -DskipTests
You can then run a given ClassName
via:
mvn exec:java -Dexec.mainClass=com.example.pubsub.ClassName \
-DpropertyName=propertyValue \
-Dexec.args="any arguments to the app"
mvn exec:java -Dexec.mainClass=com.example.pubsub.QuickstartSample