Add Topics to Connectors
After adding a connector, you can now add topics to it.
You have several options for adding topics to connectors.
Notes:
- When configuring connector topics, you have the option to use one local topic to publish to multiple remote topics.
- Please consider the following when working with integration connectors.
- The performance of outbound data in integration connectors is slow (around 4MB/sec).
- If you use the Queue mode FIFO (First In First Out), this can lead to higher CPU usage.
You can add Outbound (Local to Remote) and Inbound (Remote to Local) topics to connectors.
If you are adding individual outbound topics, you will need to connect the DeviceHub device and tags that will be used to create the topics. See Connect a Device and Add Tags to learn more.
To add a topic to a connector:
- From the Integration pane, click the connector tile you want to add the topic to.
- Click the Topics tab.
Click the Add icon and select Add a new subscription.
- Select a data direction from the Data Direction drop-down list.
- Local to Remote - Inbound
- Remote to Local - Outbound
- In the Local Data Topic field, paste the Raw Topic for the tag or click the search icon and select the appropriate DeviceHub device and tag.
- The Remote Data Topic field may have a default value for the Integration topic parameter of the connector. If the field is blank, enter the remote data topic name.
- Enter a short description in the Description field.
- (If available) From the Qos dropdown menu, select a Quality of Service value. Available values: default, 0, 1, 2
- Click the Enable toggle to enable the connection.
- Click OK. If the connector is CONNECTED, the Confirmation dialog box appears.
- Click Yes. Follow the prompt to restart the connector. The new topic appears on the Topics pane and is enabled.
You can automatically import tags from a device in DeviceHub and convert them to topics.
To import tags from DeviceHub:
- From the Integration pane, click the connector tile you want to add the topic to.
- Click the Topics tab.
Click the Import from DeviceHub tags icon. The DeviceHub Import dialog box displays.
Select the checkbox for individual devices to import all the tags for that device. Alternatively, select the checkbox for Raw / Alias to select tags from all DeviceHub devices.
- When done select tags to import, click Yes, proceed with import.
You can upload a CSV file of topics and automatically add them to the connector.
You will first need to download the sample file that will be used to upload the topics to add to the connector.
To download the sample file:
- From the Integration pane, click the connector tile you want to add the topic to.
- Click the Topics tab.
- Click the Download icon and select Download a sample.
After downloading the file, use the template to enter all the topics that will be added to the connector.
Important: Review the following for configuring the Instance ID and Instance Name for the CSV file:
- If the Instance ID and Instance Name aren't configured correctly, the entire CSV file will be rejected and no topics will be uploaded.
- If the Instance ID isn't configured correctly but the Instance Name is configured correctly, the appropriate Instance ID will be retrieved from the associated Instance Name and the CSV file will upload topics successfully to the retrieved Instance ID.
You must enter data for the following parameters:
- Instance ID: This field must be entered correctly. See the Important note above. Retrieve this parameter by copying the Instance Identifier field from the connector tile.
- Instance Name: See the Important note above. Retrieve this parameter from the name configured for the connector.
- Direction: Enter one of the following based on the direction of data for the topic: Inbound or Outbound.
- Local Remote Topic: If the topic is Outbound, you will need to define the topic that will be sending the data our of Litmus Edge. Enter the local topic name or click the copy icon for the topic name from DeviceHub > Tags. If the topic is Inbound, you can leave the field blank.
- Remote Data Topic: If the topic is Inbound, you will need to define the topic that will be used to pull data into Litmus Edge. Enter the name of the remote data topic. If the topic is Outbound, you can leave the field blank.
- Enable: You must enter one of the following statuses depending on how you want the topic enabled: True or False.
- QoS: Only required for the following connectors. Enter one of the following values: default, 0, 1, 2.
- MQTT - Amazon AWS IoT Core over SSL
- MQTT - Azure IoT Hub using Device Certificates
- MQTT - Azure IoT Hub using SAS Key
- MQTT Generic
- MQTT - Generic over SSL
- MQTT - IBM Watson over SSL
- MQTT - System Protobuf SSL
- MQTT - System Protobuf TCP
The Description field is optional and can be left empty.
Once you update the template CSV file, you can upload it.
To upload the CSV file:
- From the Integration pane, click the connector tile you want to add the topic to.
- Click the Topics tab.
Click the Add icon and select Upload CSV.
- Select the file and click Open.
Refer to the following CSV file example that includes one inbound topic and one outbound topic.