Overview – MQTT
The OAS platform MQTT connector provides a MQTT broker and a MQTT client. Any local or remote MQTT client can subscribe to the OAS broker and receive Tag data updates in real-time. You can also send data to remote brokers using the MQTT driver configuration and assign individual Tags to subscribe to external broker topics or publish a set of selected tags to an external broker.

MQTT Broker
The broker provided by the OAS platform is a part of the MQTT product feature. It is installed as part of the OAS platform installation providing you with a broker for reading and writing Tag data.
Tag data is presented in topic names that use standard Tag Path notation. For example, if you have a tag group called Site1 and tag in the tag group called Temperature then the tag path for the Value property of the Temperature tag will be Site1.Temperature.Value.
The following images illustrate how a Tag is presented as an MQTT topic:


Using the Configure > Options > MQTT screen, you can configure a number of MQTT parameters including:
- Port numbers
- SSL security
- Broker client ID
- Retain feature
- Authentication
MQTT Client Driver
The MQTT client driver provided by the MQTT product feature allows you to publish to and subscribe from external MQTT brokers.
Subscribe to External Broker Topics
To subscribe to external broker topics, you will create an MQTT driver instance with the required connection parameters to authenticate against the external broker. To read the value of a specific topic, you will create a Tag, set the Data Source property to MQTT, select the driver you created and then specify the topic name. This Tag will now be updated whenever the external broker publishes a new value to the specified topic.
Publish to External Broker Topics
To publish to an external broker topic, you will create an MQTT driver instance and then set the Publish Selected Tags feature.
This feature allows you to specify a list of Tags that should be published to a given topic. The chosen Tags will be published based on a configurable interval, a Boolean Tag event trigger or a time based schedule. You can control a number of different parameters to customize the JSON payload structure. See IoT Publish for details.