How-To Guides
...
Integration Guides
Google Cloud Pub/Sub Integrati...

Use Custom Attributes in the Google Cloud Pub/Sub Connector

4min

When integrating the Google Cloud Pub/Sub Integration Guide connector, you have the option to configure custom attributes. Review the following user scenario for using custom attributes.

User Scenario Overview

Consider a scenario where you have multiple manufacturing sites worldwide, and one Litmus Edge instance is connected to each site. Each Litmus Edge instance also has one Google Cloud Pub/Sub Connector integrated with an outbound connection. To categorize the data being sent from Litmus Edge to the Google Cloud Platform, you want to add custom attributes to each connector so that you know the origin of the data.

You will create the following key custom attributes:

  • Country
  • City
  • Site ID

Configure Custom Attributes

To review the entire workflow for setting up an outbound connection with the Google Cloud Pub/Sub Connector, refer to Google Cloud Pub/Sub Integration Guide. The steps below focus on configuring the custom attributes for one of the Litmus Edge instances described in the user scenario above.

To configure custom attributes:

  1. Navigate to Integration.
  2. From the Integration pane, click the Add a connector box. The Add a Connector dialog box appears.

    Add a connector icon
    Add a connector icon
    
  3. Select Google Cloud Pub/Sub Connector.
  4. Configure the connection parameters to set up a connection with the Google Service account. Refer to Google Cloud Pub/Sub Integration Guide.
  5. Click the checkbox for Show Custom Attributes. The configuration section displays.

    Show Custom Attributes checkbox
    Show Custom Attributes checkbox
    
  6. Enter the following Key/Value pairs and click + Add for each pair.
    • Key: Country Value: United States
    • Key: City Value: Chicago
    • Key: Site ID Value: 2463
  7. Review the configured custom attributes and all other connection parameters. Then, click Add.

    Custom Attributes Configured
    Custom Attributes Configured
    

The connector displays in the Integration pane with the custom attributes in the connector configuration.

Sample Payload with Custom Attributes

Review the following payload with custom attributes configured.

  • The Attribute keys column displays custom attributes that are created for the payload (location and source).
  • The attribute.location column displays the value for the location attribute (Toronto).
  • The attribute.source column displays the value for the source attribute (mce).
Document image