The MQTT Node allows a workflow to publish a message to the configured topic on the Losant MQTT broker. If this is a cloud workflow, the node can also be configured to publish to one of your MQTT broker integrations.
There are three properties to configure for the MQTT Node:
- Cloud Only Broker is the MQTT broker on which to publish the topic. By default this is the Losant broker, but you may also choose one of your MQTT broker integrations. This option is only available if the workflow is a cloud workflow - if the workflow is an edge workflow, the node will always publish on the Losant MQTT broker.
- Topic Template is a string template for the topic to publish the message on. This must render to a valid topic name, and depending on the broker, there may be additional rules around the topic's format. For example, when publishing to the Losant broker, the topic cannot be a wildcard topic, an MQTT system topic, or a Losant-specific topic. (Note: It is not necessary to be subscribed to a topic in your integration in order to publish to it.)
- Message Template is an optional string template. If no message is given, a blank message is published on the configured topic.
In the above example, the contents of the
container.string field on the current payload will be published to the Losant broker on the MQTT topic
Throttling And Limits
The MQTT Node (when sending messages over the Losant broker) has the same throttling rules as using the broker directly - it is limited to 30 calls in a 15-second window (per topic) - on average, 2 calls per second.