Pub/Sub

Create Pub/Sub Topic in GCP

Add a Pub/Sub topic

  1. From the DuploCloud Portal, navigate to Cloud Services -> Pub/Sub.

  2. Select the Topics tab, and click Add. The Create a PubSub Topic pane displays.

    The Create a PubSub Topic pane
  3. Provide a Name for the Pub/Sub Topic.

  4. Enter necessary labels in the Labels field, (e.g., env: production).

  5. Click Create. The Pub/Sub topic is created.

Create a Pub/Sub Topic Subscription

  1. From the DuploCloud Portal, navigate to Cloud Services -> Pub/Sub.

  2. Select the Subscriptions tab, and click Add. The Create Subscription pane displays.

The Create Subscription pane in the DuploCloud Portal
  1. Provide a Name for the subscription.

  2. Select the Pub/Sub topic for reference from the Topic list box.

  3. From the Delivery Type list box, select one of these options:

    • Pull: Allows the subscriber to manually pull messages from the subscription at their own pace.

    • Push: Automatically pushes messages to a specified endpoint (e.g., HTTP server or API) as soon as they are published to the topic.

    • BigQuery: Delivers messages directly to a Google BigQuery table for analytics and data processing.

    • Cloud Storage: Sends messages to a specified Cloud Storage bucket, storing them as objects for later retrieval or processing.

  4. Adjust the Acknowledgement Deadline (seconds), if needed. This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message.

  5. Complete additional required fields depending on the Delivery Type:

    • Pull

      • No additional fields required.

    • Push

      • Endpoint: Enter the URL to which the messages will be sent.

      • Attributes (Optional): Define any optional key-value attributes to be included in the push request.

    • BigQuery

      • Table Name: Specify the name of the BigQuery table where messages will be stored.

      • Schema: Select the schema for the table to structure the data appropriately.

      • Optionally enable Write Metadata or Drop Unknown Fields.

    • Cloud Storage

      • Bucket: Enter the name of the Cloud Storage bucket where the messages will be stored as objects.

The filled Create Subscription pane
  1. Click Create. The subscription is displayed on the Subscriptions tab.

The Pub/Sub Subscriptions page in the DuploCloud Portal

Last updated

Was this helpful?