MQTT Source
Node ID: mqttSource · Role: Source · Realtime config: no
Description
Subscribes to an MQTT broker topic and injects received messages into the pipeline as typed sensor data. Useful for ingesting data from IoT gateways or remote sensors.
Inputs / Outputs
- Inputs: (none)
- Outputs:
Any
Config aliases
MqttSource, mqttSource, mqttSubscriber
Properties
Each row shows the setting’s label in the node’s Properties panel and, in code, its key in the node’s settings object in the config file. A setting omitted from the config file uses the default shown here.
| Property | Type | Default | Description |
|---|---|---|---|
Host host | string | 192.168.1.200 | Hostname or IP of the MQTT broker to subscribe to. |
Port port | number | 1883 | MQTT broker TCP port (typically 1883 for plain, 8883 for TLS). |
Topic topic | string | testTopic | Topic to subscribe to. MQTT wildcards (+ and #) are supported. |
Client ID clientId | string | FusionHubSubscriber | Client identifier presented to the broker. Must be unique within the broker. |
QoS qos | number | 0 | MQTT Quality-of-Service level: 0 (at most once), 1 (at least once), or 2 (exactly once). |
Example node definition
A minimal entry in config.json looks like the block below. Paste it under the sources key, keyed by an instance name of your choice. All settings are optional: anything not listed under settings uses the default from the Properties table above. See The configuration file for how the sections and endpoint wiring work.
{
"sources": {
"mqttSource": {
"outEndpoint": "inproc://mqttSource_data",
"settings": {}
}
}
}