Use Custom Attributes in the Google Cloud Pub/Sub Connector
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.
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
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:
- Navigate to Integration.
From the Integration pane, click the Add a connector box. The Add a Connector dialog box appears.
- Select Google Cloud Pub/Sub Connector.
- Configure the connection parameters to set up a connection with the Google Service account. Refer to Google Cloud Pub/Sub Integration Guide.
Click the checkbox for Show Custom Attributes. The configuration section displays.
- 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
Review the configured custom attributes and all other connection parameters. Then, click Add.
The connector displays in the Integration pane with the custom attributes in the connector configuration.
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).