Scheduling the invoice for the payment queue (pub/sub)

In this section, we will learn how to push a message to a pub/sub topic for the invoice processing system to process the invoice. We will cover the process of creating a pub/sub topic, as well as how to publish and subscribe to messages from the topic.

Let's create a topic and test it:

  1. To enable the Cloud Pub/Sub API, go through the following steps:
    1. Search for the Pub/Sub API from the home page.
    2. Enable the API.
  2. To create a pub/sub topic and subscription, go through the following steps:
    1. Select Pub/Sub from the left panel.
    2. Click on Create Topic.
    3. From the left panel, go to Subscriptions and create a subscription for the created topic.
  1. From the option shown in the following screenshot, ...

Get Hands-On Artificial Intelligence on Google Cloud Platform now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.