Overview of the MQTT Collector

The Historian MQTT collector collects Predix time series data, and sends it to the Historian database. It works as follows:
  1. Connects to an MQTT broker, and subscribes to a topic. In this case, the data bus of Predix Edge serves as the MQTT broker.
  2. Collects the data, which is in the Predix time series (JSON) format.
  3. Adds relevant tags to the Historian database based on the data received.
  4. Sends data to the Historian database.
The following diagram illustrates how the MQTT collector collects and sends data. The red lines indicate the initial, one-time steps. The green lines indicate the steps performed every time data is sent.
With latest enhancements, now we are supporting array datatype tags along with primitive data types. The following is the sample for sending the array data:
{"body":[{"attributes":{"machine_type":"machine1"},"datapoints":[[1686040732424,[1645,4177,5674,3504],3]], "name":"NewArrayTag1"}],"messageId":"Simulate"}

The bolded text shows how to pass array type and the format followed is datapoints:[ [timestamp, value or [ array of values], quality] ].

Limitations

  • Linux MQTT collector does not have the facility to provide the port number. If the broker is not running on the port 1883, the collector will not be able to connect with the source.
  • Linux MQTT collector does not have the facility to provide the user name and password based authentication.
  • Linux MQTT collector does not have the facility to provide the certificate based authentication.
  • Spark plug-B format is not supported.
  • Only MQTT V311 is supported.
  • Message Retention option is not supported.
  • Custom QoS is not supported.