Skip to content

Latest commit

 

History

History
 
 

cloud-client

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Getting Started with Cloud Pub/Sub and the Google Cloud Client libraries

Google Cloud Pub/Sub is a fully-managed real-time messaging service that allows you to send and receive messages between independent applications. This sample Java application demonstrates how to access the Pub/Sub API using the Google Cloud Client Library for Java.

For more samples, see the samples in google-cloud-java.

Quickstart

Setup

  • Install Maven

  • Install the Google Cloud SDK and run :

    gcloud config set project [YOUR PROJECT ID]
    
  • Build your project with:

    mvn clean package -DskipTests
    

Testing

Run the tests with Maven.

mvn clean verify

Creating a new topic (using the quickstart sample)

mvn exec:java -Dexec.mainClass=com.example.pubsub.QuickstartSample