- Print
Publish functions for MQTT can only be leveraged with On Prem Connector Hosts with version LTS13 or greater. Any Cloud Connector Host version can be used. Learn More
Overview
For details on creating MQTT Connectors, visit the guide: How to Configure a Connector.
Tulip can natively publish data from its product to your MQTT broker, integrating seamlessly into a Unified Namespace or enterprise event bus.
Creating Functions
You can create MQTT connectors from either the connectors page or the machine data sources page. Any data source created in one location will automatically appear in the other.
To create a function, click "Create Function" within the connector configuration.
Configuring Functions
The following fields can be defined for an MQTT connector function:
Field | Description |
---|---|
Quality of Service | The guarantee level for message delivery between sender and receiver. Levels are 0 (at most once), 1 (at least once), and 2 (exactly once). |
Topic | The subject or channel where messages are published or subscribed. Topics filter and route messages between clients. |
Retain Message | Indicates if the last message on a topic should be retained by the broker and sent to new subscribers. If true, the broker stores the last message and its QoS. |
Payload | The actual content of the MQTT message. This can be any data format, such as text or JSON. User inputs can be added to the payload by enclosing the input name in "$" symbols. |
User Defined Inputs | A list of user-defined inputs to the function. These inputs can be used in the topic or payload by enclosing the input name in "$" symbols. |
Using Functions in Apps
MQTT publish functions work like HTTP or SQL connectors but do not return any data.
In the example below, the application updates orders:
Function:
Application:
Output: