blob: 36fcb084834445ee4aa054391d6b79026fcd8af7 [file] [log] [blame]
Yang Gao084ef522015-04-15 11:34:15 -07001NOTE: This example does not build and is being updated.
Abhishek Kumar85f99632015-02-25 11:45:05 -08002Experimental example code, likely to change.
3Users should not attempt to run this code till this warning is removed.
4
Chen wang84232512015-02-12 17:29:18 -08005C++ Client implementation for Cloud Pub/Sub service
Chen Wang4402b702015-02-03 12:11:29 -08006(https://developers.google.com/apis-explorer/#p/pubsub/v1beta1/).
7
8"Google Cloud Pub/Sub" API needs to be enabled at
9https://console.developers.google.com/project to open the access for a client.
10Select the project name, select the "APIs" under "APIs & auth", and turn
11on "Google Cloud Pub/Sub" API.
12
13To run the client from Google Compute Engine (GCE), the GCE instance needs to
14be created with scope "https://www.googleapis.com/auth/cloud-platform" as below:
15
16gcloud compute instances create instance-name
17 --image debian-7 --scopes https://www.googleapis.com/auth/cloud-platform
Chen wang84232512015-02-12 17:29:18 -080018
Chen Wang4402b702015-02-03 12:11:29 -080019
Abhishek Kumar85f99632015-02-25 11:45:05 -080020To run the client:
21make pubsub_client
22bins/opt/pubsub_client --project_id="your project id"