Before you start
- Assign access capabilities to create a hosted MQTT extractor and for the extractor to write data points, time series, events, RAW rows and in to data models in the target CDF project.
Deploy the extractor
1
Navigate to extractors
Navigate to Data management > Integrate > Extractors.
2
Set up the extractor
Locate the Cognite MQTT extractor and select Set up extractor.
Message formats
MQTT is a generic message transport protocol agnostic to the message payloads, which can be on any format. The Cognite MQTT extractor supports several pre-defined message formats. If you want to define your own custom mapping of MQTT messages, see custom data formats for hosted extractors. Custom formats used with MQTT jobs will receive aninput argument containing the message as JSON, and a context argument containing the topic, for example:
+ denotes a single-level wildcard and matches any text between two slashes. For example, if you have several topics like these:
# denotes a multi-level wildcard and matches any text. It has to be used at the end of the topic filter. For example, if you have several topics like the following:
Encryption
The MQTT extractor supports connecting to MQTT brokers with Transport Layer Security (TLS) encryption. Select Enable Transport Layer Security (TLS) on the connection when you set up the connection to the broker. Upload the root certificate to the MQTT extractor when you’re creating the connection if your broker uses a custom Certificate Authority (CA) to create and sign the certificate used for encryption. The extractor support PEM and DER formats.Certificate versionThe MQTT extractor only supports x509 certificates of version 3. Earlier versions will not work with the extractor.