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 connector, you have the option to configure custom attributes. Review the following use case for using custom attributes.

Use Case Overview

Consider a scenario where you have multiple manufacturing sites worldwide, and one Manufacturing Connect Edge instance is connected to each site. Each Manufacturing Connect Edge instance also has one Google Cloud Pub/Sub Connector integrated with an outbound connection. To categorize the data being sent from Manufacturing Connect 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 the Google Cloud Pub/Sub Integration Guide. The steps below focus on configuring the custom attributes for one of the Manufacturing Connect Edge instances described in the use case above.

To configure custom attributes:

  1. Navigate to Integration.
  2. From the Integration pane, click Add a connector. 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 the 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