How-To Guides
Integration Guides
Google Cloud Pub/Sub Integration Guide
15 min
review the following guide for setting up an integration between belden horizon data operations and https //cloud google com/pubsub/docs/overview once the integration is set up, you can use it for the following publishing data from a topic in your edge device to a subscription topic in the google cloud platform subscribing to data published by a publication topic in the google cloud platform before you begin you need to create a google service account make sure the account has the correct roles and permissions required for setting up the connection refer to the following google resources for learning more about pub/sub and configuring connections https //cloud google com/pubsub/docs/overview https //cloud google com/vpc/docs/configure private google access hybrid#config choose domain (information regarding private access to gcp services) https //cloud google com/vpc service controls/docs/supported products#table pubsub (information regarding private access to gcp services) https //pkg go dev/cloud google com/go/pubsub#publishsettings https //cloud google com/pubsub/docs/publisher set up the outbound connection (publish to google pub/sub) follow the steps below to set up the outbound connection step 1 create publication topic in google cloud platform in the google cloud platform, create a publication topic a matching subscription topic is created automatically, with the sub suffix appended to the topic name step 2 add device follow the steps to docid\ t cwpe0 jsfw5 aoj8wpp the device will be used to store tags that will be eventually used to create outbound topics in the connector make sure to select the enable data store check box step 3 add tags after connecting the device in belden horizon data operations, you can docid\ wpe2hmxelarlbnhwbuchy to the device create tags that you want to use to create outbound topics for the connector step 4 add the google cloud pub/sub connector follow the steps to docid\ orxib vla2ngvdx94z1ow and select the google cloud pub/sub connector provider for more information about message publication settings, see the https //pkg go dev/cloud google com/go/pubsub#publishsettings configure the following parameters name enter a name for the connector service account key ( json) create a service account key in your google cloud platform in json format copy or save all the content from the json file and paste or upload it here the project id of the cloud project copy the id from your google cloud platform and paste it here the private key id of the cloud project copy the key id from your google cloud platform and paste it here the client email of the cloud project enter the email from your google cloud platform integration topic copy the name of the publication topic (without the " sub" suffix) from your google cloud platform and paste it here show custom attributes you can add custom attributes in key/value pairs for further data processing refer to the following to learn more docid\ dslnjgjajldekxtgwrp4u google documentation for https //cloud google com/pubsub/docs/publisher#using attributes parallel publish count the number of messages being published simultaneously the default value is 100 parallel byte threshold the minimum size of a batch (in bytes) for the batch to be published the default value is zero, which means that there is no threshold (limit) publish count threshold the minimum number of messages in a batch for the batch to be published the default value is zero, which means that there is no threshold (limit) publish delay threshold (milliseconds) the maximum time that the client will attempt to publish a batch of messages the default value is zero, which means that there is no threshold (limit) throttling limit the maximum number of messages per second to be processed the default value is zero, which means that there is no limit persistent storage when enabled, this will cause messages to undergo a store and forward procedure messages will be stored within belden horizon data operations when cloud providers are online step 5 enable the connector if you see a failed status, review the docid\ ocbqwycy xmmkwv9aunq and any relevant error messages if you see a failed status, review the docid\ ocbqwycy xmmkwv9aunq and any relevant error messages step 6 create outbound topics for connector you will now need to import the tags you added in step 2 to the connector as topics to create outbound topics click the connector tile the connector dashboard appears click the topics tab click the import from devicehub tags icon the devicehub import dialog box appears select all the tags to import and click import after importing the tag(s), do the following edit the tag and configure the remote data topic copy and paste the name of the subscription topic (with the sub suffix) from your google cloud platform make sure the connector has a connected status step 7 enable topics because you imported devicehub tags for a connected connector, all topics will be disabled to enable the topics, return to the topics tab and click the enable all topics icon step 8 verify connection in google cloud platform to verify the connection in google cloud platform pull the subscription topic to see messages it receives from the belden horizon data operations outbound topics created previously view the subscription statistics set up the inbound connection (subscribe to google pub/sub) follow the steps below to set up the inbound connection see https //cloud google com/pubsub/docs/publisher to learn more about publishing messages in google pub/sub step 1 create publication topic in google cloud platform in the google cloud platform, create a publication topic step 2 add the google cloud pub/sub connector follow the steps to docid\ orxib vla2ngvdx94z1ow and select the google cloud pub/sub connector provider configure the following parameters name enter a name for the connector service account key ( json) create a service account key in your google cloud platform in json format copy or save all the content from the json file and paste or upload it here the project id of the cloud project copy the id from your google cloud platform and paste it here the private key id of the cloud project copy the key id from your google cloud platform and paste it here the client email of the cloud project enter the email from your google cloud platform integration topic copy the name of the publication topic from your google cloud platform and paste it here show custom attributes you can add custom attributes in key/value pairs for further data processing refer to the following to learn more docid\ dslnjgjajldekxtgwrp4u google documentation for https //cloud google com/pubsub/docs/publisher#using attributes parallel publish count the number of messages being published simultaneously the default value is 100 parallel byte threshold the minimum size of a batch (in bytes) for the batch to be published the default value is zero, which means that there is no threshold (limit) publish count threshold the minimum number of messages in a batch for the batch to be published the default value is zero, which means that there is no threshold (limit) publish delay threshold (milliseconds) the maximum time that the client will attempt to publish a batch of messages the default value is zero, which means that there is no threshold (limit) throttling limit the maximum number of messages per second to be processed the default value is zero, which means that there is no limit persistent storage when enabled, this will cause messages to undergo a store and forward procedure messages will be stored within belden horizon data operations when cloud providers are online step 3 enable the connector after adding the connector, click the toggle in the connector tile to enable it if you see a failed status, review the docid\ ocbqwycy xmmkwv9aunq and any relevant error messages step 4 create inbound topics for connector you will now need to create a topic in belden horizon data operations from the google cloud platform publication topic created in step 1 to create inbound topics navigate to integration click the connector tile click the topics tab click the add a new subscription icon the data integration dialog box appears configure the following parameters data direction select remote to local inbound local data topic enter a name for the topic name in belden horizon data operations remote data topic copy and paste the publication topic from your google cloud platform enable select the toggle to enable the topic click yes to add the topic from the connector tile, ensure the connector is not disabled and still shows a connected status also verify the topic shows an enabled status step 5 send messages in google cloud platform start sending messages through the publication topic (created in step 1) from the google cloud platform see https //cloud google com/pubsub/docs/publisher to learn more step 6 verify connection in belden horizon data operations you can do one of the following to verify the connection in belden horizon data operations when configuring the flow or application, use the the local data topic name configured in step 4 docid\ crmxroqtwtycjcddtoahd to view the messages coming from google pub/sub through the connector you created visualize the incoming data using one of the dedicated docid\ lx7dl0c5kfauyke7cv9ih such as grafana