Skip to Content
Cloud Analytics with Google Cloud Platform
book

Cloud Analytics with Google Cloud Platform

by Sanket Thodge
April 2018
Beginner to intermediate content levelBeginner to intermediate
282 pages
9h 53m
English
Packt Publishing
Content preview from Cloud Analytics with Google Cloud Platform

Using the gcloud command-line tool

The gcloud command-line tool is included in the Cloud SDK. This tool is used to perform operations in Cloud Pub/Sub. As we can see in the following program, first we are creating a topic with the name myTopic. Then we are creating a subscription mySubscription and assigning it to myTopic. Once this is done we are sending data or publishing data to the topic, myTopic with the message Hello World!!.

And the last thing that we are doing is to pull the subscription to receive the data. You can also use push subscription.

gcloud initgcloud pubsub topics create myTopicgcloud pubsub subscriptions create --topic myTopic mySubscriptiongcloud pubsub topics publish myTopic --message “Hello World !!!”gcloud pubsub subscriptions ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Science on the Google Cloud Platform

Data Science on the Google Cloud Platform

Valliappa Lakshmanan
Hands-On Machine Learning on Google Cloud Platform

Hands-On Machine Learning on Google Cloud Platform

Giuseppe Ciaburro, V Kishore Ayyadevara, Alexis Perrier, Bryan Fry, Antonio Gulli
Google Cloud Cookbook

Google Cloud Cookbook

Rui Santos Costa, Drew Hodun

Publisher Resources

ISBN: 9781788839686Other