Create a Cloud Pub/Sub connection

You're viewing Apigee X documentation.
View Apigee Edge documentation.

The Cloud Pub/Sub Connector lets you publish messages to a topic in Cloud Pub/Sub. The Cloud Pub/Sub connection can be configured to publish messages using task outputs in Apigee Integration.

This page provides a reference for configuring a Cloud Pub/Sub connection and using the Cloud Pub/Sub connection with Apigee Integration.

Cloud Pub/Sub provides many-to-many, asynchronous messaging that decouples senders and receivers. Cloud Pub/Sub delivers low-latency, durable messaging that helps developers quickly integrate systems hosted on Google Cloud and external platforms.

If you are new to Cloud Pub/Sub, try one of the Cloud Pub/Sub Quickstarts.

Before you begin

Before creating a Cloud Pub/Sub connection to use in your integration, do the following:

  • Create a Cloud Pub/Sub topic, as described in Quickstart: Using the console.
  • Grant the following role to the service account that you want to use to create the connection:
    • roles/pubsub.publisher

    For more on Cloud Pub/Sub roles, see Access Control.

  • Enable the following services:
    • apigee.googleapis.com (Apigee API)
    • secretmanager.googleapis.com (Secret Manager API)
    • connectors.googleapis.com (Connector Platform API)

    If these services have not been enabled for your project previously, you are prompted to enable them when creating the connection in the Create Connection page.

Create a connection

  1. In the Cloud console, go to Apigee > Connectors page and select or create a Google Cloud project.

    Go to the Connections page

  2. Click + CREATE NEW to open the Create Connection page.
  3. Configure the connection:
    1. In the Create Connection section, complete the following:
      • Connector: Select GCP > Pub/Sub from the drop down list of available connectors.
      • Connector version: Select the connector version from the drop down list of available versions.
      • In the Connection Name field, enter a name for the connection instance.

        Connection names must meet the following criteria:

        • Connection names can use letters, numbers, or hyphens.
        • Letters must be lower-case.
        • Connection names must begin with a letter and end with a letter or number.
        • Connection names cannot exceed 63 characters.
      • Optionally, add a Description of the connection instance.
      • Service Account: Select a service account that has the required roles.
      • Project ID: Enter the of the Google Cloud project where the Cloud Pub/Sub instance resides.
      • Topic ID: Enter the name of the Cloud Pub/Sub topic where the message should be published.
      • Optionally, click + ADD LABEL to add a label to the Connection in the form of a key/value pair.
      • Click NEXT.
    2. Location: Choose the location for the connection.
      • Select a location where Apigee is available from the Region drop-down list.

        Supported regions for Connectors include:

        • asia-east1
        • asia-northeast1
        • asia-south1
        • asia-southeast1
        • australia-southeast1
        • europe-west1
        • europe-west2
        • europe-west3
        • europe-west4
        • europe-west6
        • northamerica-northeast1
        • southamerica-east1
        • us-central1
        • us-east1
        • us-east4
        • us-west1
        • us-west2
      • Click NEXT.
    3. Authentication: Provide authentication credentials for your connection instance, if required. The Cloud Pub/Sub connection does not require authentication configuration.
    4. Click NEXT.
    5. Review: Review your connections's configuration details. In this section, the Connection details and Authentication details of the new connection are displayed for your review.
  4. Click Create.

Create a Connectors task

After you create a Cloud Pub/Sub connection, it becomes available in Apigee integrations. You can then use the connection to configure the Connectors tasks in your integrations. For more information, see Configure the Connectors task.