Skip to main content
Version: 5.6

MQTT-Subscribe (Trigger)

MQTT-Subscribe is the MQTT trigger used to monitor configured topics. When MQTT messages are received, it triggers the subsequent transfer. The content of the received message is then available to the connection for further processing.

In the properties dialog, you specify which broker connection is used for the subscription and how received messages are interpreted:

MQTT-Subscribe, General tab

warning

If topics are subscribed to multiple times via MQTT Subscribe in different connections, this may result in duplicate triggers for the individual connections.

This also applies to the use of wildcards.

The individual properties are:

PropertyDescription
Broker ConnectionSelect the configured MQTT broker connection through which the topic is to be subscribed.
TopicName of the topic to be monitored. Depending on the broker, topic patterns with wildcards can also be used. Clicking Start Browsing allows you to initiate a topic selection based on the current broker connection.
Quality of ServiceSets the Quality of Service value for the subscription. 0 processes messages without additional confirmation, 1 with a simple acknowledgment, and 2 with full delivery assurance. Selecting Use Plug-in Setting applies the default value stored in the MQTT plug-in.
Wait for TransferSpecifies whether the trigger waits for the subsequent transfer to complete before the message is considered processed internally.
Payload Data TypeSpecifies whether the received payload is passed to the connection as a byte array or as a string.
Payload EncodingSpecifies the character encoding used to interpret string payloads.
Null ValuesSpecifies how received null values are handled. In the screenshot, Prohibit Null Values is selected as an example.
note

Not all properties are always available in the General tab. Which additional options are displayed depends on the selected MQTT profile for the chosen broker connection.

PropertyDescription
Enable response topic and correlation data outputEnables additional MQTT-5 information for the response topic and correlation data in the trigger output. This option is relevant if incoming messages are processed according to the request-response pattern and the associated MQTT-5 information is to be reused in the connection.

MQTT 5 User Properties

The MQTT 5 User Properties tab is used to make MQTT 5 user properties from received messages available in the connection.

MQTT 5 user properties are freely definable key-value pairs that are transmitted in addition to the actual payload. They therefore do not contain payload data in the strict sense, but rather supplementary metadata about the message.

Typical use cases include:

  • Identifying the origin of a message, for example Source=Plant 3
  • Providing additional technical information, for example MessageType=Alarm or Area=Filling
  • Providing additional technical details, for example SchemaVersion=1.0
  • Evaluation in subsequent transfers or target systems that specifically take MQTT-5 user properties into account

Use this tab only if the receiving or downstream processing system actually requires MQTT-5 user properties. If this metadata plays no role in your workflow, the tab can remain unused.

note

As with the MQTT transfer object, MQTT-5 user properties do not replace the actual message content. Content that requires business processing should continue to be transmitted in the payload or within a clear topic structure.