MQTT (Input Agent)

Important note: This Input Agent can only be selected if at least one MQTT connection has been set up.

Settings


(1) Start on IS only: Only relevant for the add-on module Load Balancing to start the profile on a specific node.

(2) Connection alias: The MQTT alias. See section MQTT connections. Important note: If possible, please use a separate alias for each profile. Using an alias in multiple profiles may cause problems under certain circumstances.

(3) Topic: The topic to be listened to.

(4) Quality of service: The transmission quality (Quality of Service, QoS).

At most once

The lowest-cost in terms of volume of data transfer. This is suitable if you have a reliable connection between the Integration Server and the MQTT broker.

At least once

A good choice if you need to be sure every message gets through and you can tolerate receiving a message more than once.

Exactly once

Guarantees delivery exactly once, but has a relatively high cost in terms of data transfer.

(5) Buffer messages and (6) Max wait time: Messages are collected in a buffer. The profile is started with the collected messages when either the maximum number of collected messages is reached or the maximum waiting time. If the profile is saved, messages in the buffer are deleted. Note: The desired seconds can also be entered manually.

(7) Type of incoming data: The data type of the input data.

(8) Value to forward: If messages are collected (value in (5) is greater than "1"), you can decide which ones are to be passed on. If you select "All", you might have to use a delimiter (9) between the single messages. Note: If the value Integer is selected in (7), you can use the options "Minimum", "Maximum", "Average".

(9) Delimiter for messages: The delimiter for messages. You can also specify hex codes with prefix "0x". See also (8). Note: Only active if the value in (5) is greater than "1".

(10) Additional (premature) case to forward: Here you can specify conditions (for numerical values, for strings or regular expressions) when messages are to be forwarded to the profile for processing prematurely (only one must apply), see section MQTT (Control Center). If, in the example, the message does not contain the string lens (→ set corresponding condition), it will be collected. If the string lens is contained, the message is passed on immediately and the collection counter is reset, i.e. other collected messages are discarded. As an alternative to conditions, you can use a function chain to check messages. If the function chain returns true at the end, the check is considered successful. Note: Only active if the value in (5) is greater than 1.


images/download/attachments/137312395/534-version-2-modificationdate-1743051183079-api-v2.png images/download/attachments/137312395/535-version-2-modificationdate-1743051192941-api-v2.png

images/download/attachments/137312395/_mqtt_3-version-1-modificationdate-1743051128758-api-v2.png


(11) Enter the number of messages here until the function chain is checked. 1 if every message should be checked.

(12) Select a function by double-clicking (or using the arrow). It will be inserted in (13).

(13) The function chain, as you already know it from phase 3. Note: Note the specific parameter type Message.

(14) In addition to the parameter types already known from phase 3, there will also be the type Message.

(15) You can test your function chain. See the following screenshot. Note: Either the calculated value or a fixed value can be used as the result of each individual function.

(16) Here you can manually enter a message that will be used for the test.

(17) Click here to run the test.

(18) The result of the test.

System variables


In MQTT version 5, you can use system variables of the form MSG_CALL_<KEYNAME> (all in uppercase) to read out user properties (key,value) of messages. See also MSG_CALL_MQTT_CONTENTTYPE and MSG_CALL_MQTT_CORRELATIONDATA.