Publish to a Topic

When an application publishes to a topic on an MQTT broker, any subscribers of that topic will receive the published data. In order to publish to a topic on an MQTT broker endpoint using the MQTT Protocol Adapter, you must define a block in the configuration file of type cdpout. The following block configuration example will publish data to the topic output_data on the broker located at broker.ip.com:1883.
"mqtt_publisher": {
    "type": "cdpout",
    "config": {
        "transport_addr": "mqtt-tcp://broker.ip.com:1883",
        "method": "pub",
        "node_ref": "output_data",
        "log_level": "info",
        "log_name": "mqtt_publish_test"
    }
}