Introduction of MQTT Data Collector

About MQTT Data Collector

The Historian Message Queue Telemetry Transport (MQTT) Collector connects to MQTT broker and subscribes to a topic. The data should be in Predix time series data format. It automatically adds tags to Historian database and streams the data to Historian Server or Predix Time Series. This collector supports a distributed model, that is, the MQTT broker, the Collector, and Historian are installed on different machines and the data is sent to a remote Historian server. You can also install message broker, collector and Historian in same machine.

MQTT Collector with secure data transfer

Note: MQTT Collector has been validated with Predix Edge Broker, HiveMQ(v4.2.1), Moquitto(v1.5.8).

The certificate based (TLS -Transport Layer Security) authentication is used for subscribing the data from message broker to avoid middle ware attacks, to ensure that the data is securely transferred from message broker to MQTT-collector.

The collector expects the data in Predix time series format as mentioned below and converts it into Historian understandable format. It verifies whether the tag is available in the Historian, if not it will add the tag and then add the data samples.

{"body":[{"attributes":{"machine_type":"opcua"},"datapoints":[[1558110998983,9547909,3]],"name":"QuadInteger"}],"messageId":"flex-pipe"}

The following table outlines json format structure.

Json fieldDescriptionMandatory/Optional
Machine typeSource machine nameOptional
Datapoints

Time, value and quality (Time in epoch format)

Mandatory
NameTag nameMandatory
MessageIdType of messageOptional