Google Cloud Platform Pub/Sub

Overview

Connector namegcp-pubsub
Typesource, sink
Delivery guaranteeat least once

Prerequisites

You must have the following.

  • A GCP service account key that can be used for authentication. You can create and download the key by browsing to the Keys tab under the Service Account details in GCP IAM.

  • The following GCP roles assigned to the service account principal:

    GCP ResourceRole 1Role 2
    SubscriptionPub/Sub ViewerPub/Sub Subscriber

Steps

To create and configure a connector for Pub/Sub, sign in to the Decodable Web Console, navigate to the Connections tab, click on New Connection, and follow the steps below. For examples of using the command line tools or scripting, see the How To guides.

  1. Select a connector type source, where data will be streamed into Decodable for processing by one or more pipelines

  2. Provide the project name containing the Pub/Sub resource

  3. Provide the subscription name of your Pub/Sub topic. Note that the subscription's delivery type must be 'Pull'.

  4. Provide the JSON service key secret for the service account to access Pub/Sub

  5. Specify the value format to read message payloads from Pub/Sub

📘

Subscription Deadlines

Messages are acknowledged to Pub/Sub approximately every 10 seconds. Therefore it is recommended to set the subscription's acknowledgement deadline to be much larger, or else the messages may be processed multiple times.

Configure As A Sink

  1. Select a connector typesink, where the contents of a stream will be written to a Pub/Sub topic

  2. Provide the project name containing the Pub/Sub resource

  3. Provide the topic name of your Pub/Sub topic

  4. Provide the JSON service key secret for the service account to access Pub/Sub

  5. Specify the value format to write message payloads to Pub/Sub

Properties

The following properties are supported by the Pub/Sub connector.

PropertyDispositionDescription
projectrequiredThe project name the Pub/Sub resource is located in
topicrequired (sink)The topic name to write events to
subscriptionrequired (source)The subscription name to read events from
subscription.max-messages-per-pulloptionalMax messages per pull request. Default: 100
subscription.per-request-timeout-secoptionalSubscription request timeout (s). Default: 15
subscription.retriesoptionalSubscription retry limit. Default: 3