Datasource: MQTT Subscribe
Use MQTT Subscribe for low-latency IoT and telemetry ingestion.
The datasource connects to a broker, subscribes to a topic, and emits each message as a workflow event.
Best Use Cases
- Sensor telemetry ingestion
- Device fleet event collection
- Lightweight, high-frequency event transport
Configuration Fields
| Field | Required | Type | Default | Purpose |
|---|---|---|---|---|
broker | Yes | string | - | MQTT broker URL |
topic | Yes | string | - | Topic or wildcard subscription |
qos | No | number | 0 | Quality of service (0, 1, 2) |
How to Configure Correctly
- Select MQTT Subscribe datasource type.
- Enter broker URL including scheme and port.
- Define topic carefully (
devices/site-a/#,sensors/temp). - Set QoS based on delivery reliability needs.
- Save and attach datasource to workflow trigger.
- Validate message payload shape before downstream logic.
Example Config
{
"broker": "mqtt://broker.example.com:1883",
"topic": "factory/line-3/sensors/#",
"qos": 1
}
Topic Design Guidance
- Use deterministic topic hierarchies
- Separate production and test namespaces
- Keep topic cardinality manageable
- Avoid broad wildcard subscriptions in high-volume systems
Common Problems
- No events: wrong topic or incorrect broker endpoint
- Duplicate/unexpected delivery: QoS misunderstanding
- Unstable behavior: broker disconnects or network policy blocks
Related Pages
- Continue with Datasources for ingestion architecture.
- Continue with Workflows for event filtering and routing patterns.
