How to create a new Pub/Sub Topic on Google Cloud
Pub/Subs are popularly used for asynchronous communication between applications. This article is a quick walkthrough of how you can create a Pub/Sub Topic on Google Cloud.
Pub/Subs are popularly used for asynchronous communication between applications. This article is a quick walkthrough of how you can create a Pub/Sub Topic on Google Cloud.
Introduction
Creating a Pub/Sub Topic
Add a default subscription
Use a schema
Set message retention duration
Conclusion
Pub/Sub helps with messaging in between applications. A Cloud Pub/Sub is designed to provide reliable, many-to-many asynchronous messaging between applications. Publisher applications can send messages to a Topic and other applications can Subscribe to that Topic to receive the messages.
In Google Cloud, Pub/Sub allows applications and services to communicate asynchronously. It delivers low-latency/durable messaging in between application and services, it is commonly used by developers in implementing asynchronous workflows, distributing event notifications, and streaming data from various processes or devices.
Following are the steps to create Pub/Sub Topic on Google Cloud:
In the following sections, all three options have been covered
To add a default Subscription just select the option and by default it will provide the following features:
We can also create a customised Subscription after the Topic has been created. The steps are as follows:
A schema is a format that messages from a topic must follow. When creating a topic you can choose to create a new schema to assign to it, or assign it an existing schema. Select the Pub/Sub schema and then the message encoding language
When Set message retention duration is enabled, it retains the messages on the Topic for up to 31 days. This is a paid feature.
Pub/Subs allow for asynchronous messaging and is widely used with many applications. In this article we took a look at Pub/Sub and covered the steps for creating a new Topic. We also looked into various options that are available to us while creating a Topic. This article is a quick walkthrough for those getting started with Google Cloud Pub/Sub.
***
This article is brought to you by Kloudle Academy, a free e-resource compilation, created and curated by Kloudle. Kloudle is a cloud security management platform that uses the power of automation and simplifies human requirements in cloud security. Receive alerts for Academy by subscribing here.