The MQTT Node enables Rayven to receive real-time messages from devices and platforms using the MQTT protocol—a lightweight, publish-subscribe messaging model ideal for constrained devices and networks.
What It Does
This node subscribes to a specific MQTT topic from a broker and processes inbound messages. It is designed for low-latency, push-based data ingestion commonly used in IoT, SCADA, and telemetry systems.
How to Use
Prerequisites
-
A running MQTT broker (Rayven-hosted or external)
-
Devices publishing data to a defined topic
-
Payloads in structured
JSON
format -
UID and timestamp fields must be identifiable in the payload (if applicable)
Rayven Workflow Implementation
-
In the Workflow Builder, open the Inputs panel.
-
Drag the MQTT Node to the canvas.
-
Double-click the node to open the configuration window.
-
Enter connection details and topic information.
-
Map the UID and timestamp fields.
-
Save and activate the node.
Configuration Fields
Field | Requirement | Description |
---|---|---|
Node Name* | Required | Name for this node instance within the workflow. |
Broker Address* | Required | Hostname or IP of the MQTT broker. Example: mqtt.rayven.io or broker.hivemq.com |
Broker Port | Optional | TCP port for the broker. Default is 1883 . |
Username* | Required | MQTT username used for authentication. |
Password | Optional | MQTT password (if required by the broker). |
MQTT Topic* | Required | The topic to subscribe to. Example: sensor/temperature |
Client ID | Optional | Custom client identifier. Leave blank to auto-generate. |
Payload Format* | Required | Format of incoming messages. Currently supports: JSON |
UID JSON Key | Optional | Path to the UID value inside the payload (e.g., device.id ) |
Timestamp JSON Key | Optional | JSON key that holds the timestamp value from the message. |
Timestamp Format | Optional | Format of the timestamp (e.g., yyyy-MM-dd HH:mm:ss , epoch , epochms ) |
Time Zone | Optional | Time zone of the originating device. Example: Australia/Sydney |
Example
Example MQTT message received:
{
"device": {
"id": "device_001"
},
"timestamp": "2025-07-15 14:45:00",
"temperature": 23.6
}
Configuration:
Field | Value |
---|---|
MQTT Topic | sensors/temperature |
UID JSON Key | device.id |
Timestamp JSON Key | timestamp |
Timestamp Format | yyyy-MM-dd HH:mm:ss |
Payload Format | JSON |
Resulting output:
{
"uid": "device_001",
"temperature": 23.6,
"timestamp": "2025-07-15 14:45:00"
}
Best Practices
-
Match the UID field to a device ID known to Rayven (via Device Management).
-
Use retain flag cautiously on publishers—Rayven will ingest retained messages on connection.
-
Use Quality of Service (QoS) level 0 or 1 unless strict delivery is required.
-
Always validate topic structure and message format during integration testing.
Use Cases
-
Ingest telemetry from IoT gateways or edge devices
-
Receive sensor readings (e.g., temperature, humidity, vibration)
-
Collect status updates from PLCs or SCADA systems
-
Integrate with MQTT-compatible platforms like AWS IoT Core, Azure IoT Hub (via bridge)
FAQ
Q: What if the topic receives non-JSON data?
The node expects valid JSON. Use a Script Node to transform the data or validate it upstream.
Q: Can I subscribe to multiple topics?
Each MQTT node subscribes to one topic. For multiple topics, use one node per topic.
Q: Can I use wildcard topics (+
, #
)?
Yes, MQTT wildcards are supported for topic subscriptions. Use with care to avoid noisy ingestion.