Abhishek Kumar | 85f9963 | 2015-02-25 11:45:05 -0800 | [diff] [blame] | 1 | Experimental example code, likely to change. |
| 2 | Users should not attempt to run this code till this warning is removed. |
| 3 | |
Chen wang | 8423251 | 2015-02-12 17:29:18 -0800 | [diff] [blame] | 4 | C++ Client implementation for Cloud Pub/Sub service |
Chen Wang | 4402b70 | 2015-02-03 12:11:29 -0800 | [diff] [blame] | 5 | (https://developers.google.com/apis-explorer/#p/pubsub/v1beta1/). |
| 6 | |
| 7 | "Google Cloud Pub/Sub" API needs to be enabled at |
| 8 | https://console.developers.google.com/project to open the access for a client. |
| 9 | Select the project name, select the "APIs" under "APIs & auth", and turn |
| 10 | on "Google Cloud Pub/Sub" API. |
| 11 | |
| 12 | To run the client from Google Compute Engine (GCE), the GCE instance needs to |
| 13 | be created with scope "https://www.googleapis.com/auth/cloud-platform" as below: |
| 14 | |
| 15 | gcloud compute instances create instance-name |
| 16 | --image debian-7 --scopes https://www.googleapis.com/auth/cloud-platform |
Chen wang | 8423251 | 2015-02-12 17:29:18 -0800 | [diff] [blame] | 17 | |
Chen Wang | 4402b70 | 2015-02-03 12:11:29 -0800 | [diff] [blame] | 18 | |
Abhishek Kumar | 85f9963 | 2015-02-25 11:45:05 -0800 | [diff] [blame] | 19 | To run the client: |
| 20 | make pubsub_client |
| 21 | bins/opt/pubsub_client --project_id="your project id" |