Receive
This is the Task to connnect to an MQTT broker and start a listening session.
Task version: 1.0.0
Required Frends version: 5.7+
Required .NET version: 8.0
Compatible Agents: Crossplatform
Task Parameters
Host : String
The address of the MQTT broker.
Default: -
Example: broker_host
BrokerPort : Int32
The port of the MQTT broker.
Default: -
Example: 1883
ReceivingTime : Int32
Specifies how many seconds the task (client) will live and process messages.
Default: -
Example: 10
ClientId : String
The client (session) identificator. This will allow to collect messages from an existing session
Default: -
Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
Topic : String
The topic the client subscribes to when connecting.
Default: -
Example: example topic
UseTls12 : Boolean
Whether to use TLS authentication.
Default: -
Example: false
QoS : QoS
The Quality of Service (QoS) level for the MQTT session.
Possible values:
AtMostOnce: The Quality of Service (QoS) level for the MQTT session.AtLeastOnce: The Quality of Service (QoS) level for the MQTT session.ExactlyOnce: The Quality of Service (QoS) level for the MQTT session.
Default: -
Example: QoS.AtMostOnce
Username : String
Username for authentication.
Default: -
Example: testuser
🗝Password : String
Password for authentication.
Default: -
Example: Password123
AllowInvalidCertificate : Boolean
When true, allows connections even if the server's TLS certificate is invalid (e.g., self-signed,
expired, or hostname mismatch). WARNING: This reduces security and should only be used in
development/testing environments or when connecting to internal servers with self-signed certificates.
Default: -
Example: true
Task Result
Success : Boolean
Whether connection to the MQTT broker was successful or not.
Example: true
Error : String
Error(s) if connecting to broker failed. Returns an empty string if no errors exist.
Example: Connection refused
MessagesList : ConcurrentQueue<String>
All messages received from the broker in this session.
Example: ["message1", "message2"]
CurrentClientId : String
The MQTT client ID. Used to restore a previously opened session to receive buffered messages. When making a new connection, pass it to receive buffered messages.
Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
Task Changelog
Changelog for Task Frends.MQTT.Receive.
[1.0.0] - 2025-04-07
Added
Initial implementation
Last updated
Was this helpful?

