How to use IBM App Connect with Google Cloud Pub/Sub

Google Cloud Pub/Sub is an asynchronous publish/subscribe messaging service that sends messages between different applications.

Availability:
  • App Connect Enterprise as a Service connector
  • A local connector in a Designer instance of IBM App Connect in containers (Continuous Delivery release)Local connector in containers (Continuous Delivery release) 11.0.0.10-r1 or later
  • A local connector in a Designer instance of IBM App Connect in containers (Long Term Support)Local connector in containers (Long Term Support release)
  • A local connector in a Designer instance of IBM App Connect in containers (Support Cycle 2)Local connector in containers (Long Term Support Cycle-2 release)

In a publish/subscribe service, the providers of data (publishers) are decoupled from the consumers of that data (subscribers). The publisher application sends messages to a topic, then subscriber applications subscribe to that topic to receive the messages. Publishers have no direct link to subscribers, and Google Cloud Pub/Sub acts as a publish/subscribe broker to control the flow of data between publishers and subscribers.

Use IBM® App Connect to connect Google Cloud Pub/Sub to other applications. For example, you can use IBM App Connect to retrieve flight times from an IBM Cloudant® database, then publish them in Google Cloud Pub/Sub topics. Multiple subscriber applications can then retrieve the flight times by subscribing to the Google Cloud Pub/Sub topics.

The following information describes how to use IBM App Connect to connect Google Cloud Pub/Sub to your other applications.

Supported product and API versions

To find out which product and API versions this connector supports, see Detailed System Requirements on the IBM Support page.

Connecting to Google Cloud Pub/Sub

To connect App Connect to Google Cloud Pub/Sub, you need to provide the following credentials for your Google Cloud Pub/Sub account:
Client email
The client email value can be found in the private key JSON file that you download when you create a project in the Google Cloud Console
  • Required: True
Private key
The private key for your account, which you download as a JSON file when you create a project in the Google Cloud Console
  • Required: True
Project ID
The project ID for your account, which you can find in the Google Cloud Console
  • Required: True
To obtain these values for Google Cloud Pub/Sub, complete the following steps.
  1. Log in to the Google Cloud Console.
  2. On the dashboard, select an existing project, or click Create project.
  3. Enter a project name and organization, then click Create.

    When the project is created, the Project ID is shown on the dashboard.

  4. On the Getting Started tile, click Explore and enable APIs, then click Enable APIs and services.
  5. Search for and select Cloud Pub/Sub API, then click Manage.
  6. Click Credentials, then click Credentials in APIs & Services.
  7. Click Create credentials, then Service account, and follow the on-screen instructions to create a service account.
  8. When the service appears on the Credentials page, click the service account, then click Add key, then Create new key.
  9. Select JSON as the key type, then click Create.
  10. Save the JSON file. This file contains the Client ID and Private key.

To connect to a Google Cloud Pub/Sub endpoint from the App Connect Designer Catalog page for the first time, expand Google Cloud Pub/Sub, then click Connect. For more information, see Managing accounts.

General considerations

Before you use App Connect Designer with Google Cloud Pub/Sub, take note of the following considerations:

  • (General consideration) You can see lists of the trigger events and actions that are available on the Catalog page of the App Connect Designer.

    For some applications, the events and actions in the catalog depend on the environment and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.

  • (General consideration) If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.

Events and actions

Google Cloud Pub/Sub events

These events are for changes in this application that trigger a flow to start completing the actions in the flow.

Note: In containers, only local accounts can be used for these events.
New message
New message

Google Cloud Pub/Sub actions

Your flow completes these actions on this application.

Message
Create message
Subscriptions
Create subscription
Retrieve subscriptions
Update subscription
Delete subscription
Topics
Create topic
Retrieve topics
Update topic
Delete topic

Examples

Screenshot of the dashboard tile for a template that uses Google Cloud Pub/Sub

Use templates to quickly create flows for Google Cloud Pub/Sub

Learn how to use App Connect templates to quickly create flows that perform actions on Google Cloud Pub/Sub. For example, open the Templates gallery, and then search for Google Cloud PubSub.