Google Pub Sub connection¶
Introduction¶
A Google Pub Sub connection, created using the Google Pub Sub connector, establishes access to Google Pub/Sub. Once a connection is configured, you can create instances of Google Pub Sub activities associated with that connection to be used either as sources (to provide data in an operation) or as targets (to consume data in an operation).
Note
To use the Google Pub Sub connector, you must create a service account, grant roles, and obtain certain credentials in the Google Cloud Platform as described on Google Pub Sub prerequisites.
Create or edit a Google Pub Sub connection¶
A new Google Pub Sub connection is created using the Google Pub Sub connector from one of these locations:
- The design component palette's Project endpoints and connectors tab (see Design component palette).
- The Global Connections page (see Create a global endpoint in Global Connections).
An existing Google Pub Sub connection can be edited from these locations:
- The design component palette's Project endpoints and connectors tab (see Design component palette).
- The project pane's Components tab (see Component actions menu in Project pane Components tab).
- The Global Connections page (see Edit a global endpoint in Global Connections).
Configure a Google Pub Sub connection¶
Each user interface element of the Google Pub Sub connection configuration screen is described below.
Tip
Fields with a variable icon support using global variables, project variables, and Jitterbit variables. Begin either by typing an open square bracket [
into the field or by clicking the variable icon to display a list of the existing variables to choose from.
-
Connection Name: Enter a name to use to identify the connection. The name must be unique for each Google Pub Sub connection and must not contain forward slashes
/
or colons:
. This name is also used to identify the Google Pub Sub endpoint, which refers to both a specific connection and its activities. -
Project ID: Enter the
project_id
provided by the credentials JSON file as described on Google Pub Sub prerequisites. -
Client Email: Enter the
client_email
provided by the credentials JSON file as described on Google Pub Sub prerequisites. -
Private Key String: Enter the
private_key
provided by the credentials JSON file as described on Google Pub Sub prerequisites. The private key should be entered in this format:-----BEGIN PRIVATE KEY-----<private_key>-----END PRIVATE KEY-----
Note
All newline characters (
\n
) present in theprivate_key
string must be replaced with a carriage return in the Private Key String field. Otherwise, an error will occur when testing the connection. -
Use Proxy Settings (Private Agent Only): When using a private agent, this setting can be selected to use private agent proxy settings.
-
Test: Click to verify the connection using the provided configuration. When the connection is tested, the latest version of the connector is downloaded by the agent(s) in the agent group associated with the current environment. This connector supports suspending the download of the latest connector version by using the Disable Auto Connector Update organization policy.
-
Save Changes: Click to save and close the connection configuration.
-
Discard Changes: After making changes to a new or existing configuration, click to close the configuration without saving. A message asks you to confirm that you want to discard changes.
-
Delete: After opening an existing connection configuration, click to permanently delete the connection from the project and close the configuration (see Component dependencies, deletion, and removal). A message asks you to confirm that you want to delete the connection.
Possible connection errors¶
These are possible connection errors and their solutions:
Error | Cause | Solution |
---|---|---|
An error occurred: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;CLjava/lang/Object;)V | The agent version is too old. | Ensure the agent version being used is version 10.60 or later. |
An error occurred: java.io.IOException: Invalid PKCS#8 data | Newline characters (\n ) are present in the Private Key String. | Replace any newline characters with a carriage return. |
An error occurred: io.grpc.StatusRuntimeException: PERMISSION_DENIED: User not authorized to perform this action. | The pubsub.topics.list or pubsublite.topics.list permission has not been granted to the Google Pub/Sub service account. | See Google Pub Sub prerequisites for information on assigning roles and permissions. |
An error occurred: io.grpc.StatusRuntimeException: PERMISSION_DENIED: Cloud Pub/Sub API has not been used in project 730922392691 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/pubsub.googleapis.com/overview?project=730922392691 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry. | The Google Pub/Sub API has not been enabled for the project. | Enable the Google Pub/Sub API for the project. |
Next steps¶
After a Google Pub Sub connection has been created, you place an activity type on the design canvas to create activity instances to be used either as sources (to provide data in an operation) or as targets (to consume data in an operation).
Menu actions for a connection and its activity types are accessible from the project pane and design component palette. For details, see Actions menus in Connector basics.
These activity types are available:
-
Acknowledge Message: Acknowledges messages from a subscription in Google Pub/Sub and is intended to be used as a target in an operation.
-
Create Topic: Creates topics in Google Pub/Sub and is intended to be used as a target in an operation.
-
Get Message: Retrieves messages from a subscription in Google Pub/Sub and is intended to be used as a source in an operation.
-
Publish Message: Publishes messages to a topic in Google Pub/Sub and is intended to be used as a target in an operation.
-
Create Subscription: Creates subscriptions in Google Pub/Sub and is intended to be used as a target in an operation.
-
Listen Message: Consumes messages from a Google Pub/Sub subscription and is intended to be used as a source in an operation.
-
Delete: Deletes subscriptions or topics from Google Pub/Sub and is intended to be used as a target in an operation.