Trigger
This operation is a trigger. It starts a new execution path when an MQTT message matching the subscribed topic is received. The > output pulses true during the trigger callback and returns to false afterward.
The MQTT Trigger operation subscribes to a configured full topic and starts an execution path when a matching MQTT message is received. It exposes MQTT metadata outputs including QoS, retained flag, response-topic related fields, content type, and computed message-expiry seconds.
Trigger
This operation is a trigger. It starts a new execution path when an MQTT message matching the subscribed topic is received. The > output pulses true during the trigger callback and returns to false afterward.
Inputs
This operation has no inputs.
Outputs
| Port | Type | Default | Description |
|---|---|---|---|
| > | Any | false | Untyped trigger pulse. true during callback, then false. |
| TimeStamp(ns) | Integer | Nil | Arrival timestamp in nanoseconds (system_clock epoch). |
| Topic | String | Nil | Full received topic. |
| Payload | Binary | Nil | Raw message payload. |
| QoS | Integer | Nil | Incoming QoS level. |
| MessageExpiry(s) | Integer | Nil | Remaining lifetime in seconds. Computed from expiry metadata or Nil if unavailable. |
| ResponseTopic | String | Nil | MQTT 5 response topic, if present. |
| CorrelationData | Binary | Nil | MQTT 5 correlation data, if present. |
| UserProperties | Map | Nil | MQTT 5 user properties. |
| ContentType | String | Nil | MQTT 5 content type. |
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| Topic | TextLine | "" | Full topic to subscribe to. Must start with <slot>/. Hint: Add full topic as <slot>/… |
This Operation can never err: it has no Input to check, and a message that arrives is a message, so its Node carries no On Error policy.
State on Reload
State is preserved across restarts for the following outputs:
Metadata outputs (QoS, MessageExpiry, ResponseTopic, CorrelationData, UserProperties, ContentType) are not persisted. Saved state is discarded if the configured Topic changed.
Startup — The configured topic is validated (must start with <slot>/) and the operation subscribes to it.
Message receive — When a matching message arrives, the operation sets all output values: TimeStamp(ns), Topic, Payload, QoS, and any MQTT 5 metadata fields.
MessageExpiry computation — If an absolute expiresAtMs exists, the remaining seconds are computed as ceil((expiresAtMs - nowMs) / 1000) floored at 0. Otherwise, messageExpiryInterval is used if present, or the output is Nil.
Trigger pulse — The > output pulses to true for the callback execution, starting the downstream execution path, then returns to false.
When the operation is reset:
Topic, Payload, TimeStamp(ns), QoS, ResponseTopic, CorrelationData, UserProperties, ContentType, MessageExpiry(s) are cleared to Nil.Retained is set to false.<slot>/... prefix when mqttbroker.requireSlotPrefix is enabled; otherwise any structurally valid topic is accepted. Isolation between slots does not depend on the prefix.One host setting bounds MQTT Trigger. It is read at start-up from the host’s configuration file; see the MQTT Broker configuration reference.
| Key | Type | Default | Effect |
|---|---|---|---|
mqttbroker.maxTriggerPerTask | Integer | -1 | How many MQTT Trigger nodes one Task may contain. Negative means unlimited. |
The cap travels to the editor in the operation’s schema, so the editor refuses to add a Trigger beyond it rather than letting you build a Task the server will reject.
The broker-wide settings a Trigger runs under — the granted QoS level, whether retained messages are stored, the packet-size ceiling, and the per-device rate limits — are on the same page.