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

FieldRequiredTypeDefaultPurpose
brokerYesstring-MQTT broker URL
topicYesstring-Topic or wildcard subscription
qosNonumber0Quality of service (0, 1, 2)

How to Configure Correctly

  1. Select MQTT Subscribe datasource type.
  2. Enter broker URL including scheme and port.
  3. Define topic carefully (devices/site-a/#, sensors/temp).
  4. Set QoS based on delivery reliability needs.
  5. Save and attach datasource to workflow trigger.
  6. 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.