This connector publishes an MQTT message when invoked.

See the reference documentation for Custom Actions for guidance on how to use this configuration definition.

In this example, we use the public HiveMQ MQTT broker. If you plan to use this for your testing you should choose a unique topic name.

{ 
  "$class": "io.clause.outbound.physical.MqttTopicPublish",
  "connectionString": "mqtt://broker.hivemq.com:1883",
  "topic": "clause/sample/mqtt",
  "message":response.amount.doubleValue
}

To monitor the output of your topic you can use the MQTT.js command line tool:

npm install mqtt -g

Then connect to your topic on the HiveMQ broker with the following command:

mqtt subscribe -h broker.hivemq.com -p 1883 -t clause/sample/mqtt