Skip to content

MQTT Subscribe Node

Web/MQTT

MQTT Subscribe

Subscribes to an MQTT topic and invokes a handler for each incoming message. Holds execution until the connection closes or timeout, then triggers on_close.

mqtt_subscribewebLong running
Inputs5
Outputs3
Security exposure4/10
Packageweb

Ratings

Scores range from 0 to 10. Higher values mean more impact, exposure, or operational weight.

SecurityAttack surface and exposure impact.
4/10Medium
PrivacyPotential sensitivity of processed data.
3/10High
PerformanceRuntime or resource pressure.
3/10High
GovernancePolicy, audit, or compliance impact.
5/10Medium
ReliabilityOperational stability considerations.
4/10Medium
CostExternal or compute cost impact.
1/10High

Input Pins

5

Execute

Execution
exec_in

Start subscribing

Session

Struct
session

MQTT session reference

MqttSessionMqttSession2 fields
ref_idstringrequired
client_idstringrequired
Schema enforced

Topic

String
topic

The MQTT topic filter to subscribe to

QoS

String
qos

Quality of Service level for the subscription

Default AtMostOnce
AtMostOnceAtLeastOnceExactlyOnce

Timeout (s)

Integer
timeout_seconds

How long to listen before auto-closing (0 = indefinite)

Default 0

Output Pins

3

On Subscribed

Execution
on_subscribed

Fires after the subscription is established

On Close

Execution
on_close

Fires when the subscription ends (timeout, disconnect, or error)

Error

Execution
exec_error

Fires if the subscription fails

Node Info

Internal name
mqtt_subscribe
Category
Web/MQTT
Function references
Can reference functions