MQTT Communication
An action that exchanges messages with an MQTT broker using the MQTT protocol.
MQTT (Message Queuing Telemetry Transport) is a lightweight messaging protocol primarily used in Internet of Things (IoT) applications. MQTT is optimized for environments that require low power, low bandwidth, and high reliability, and can operate efficiently even in environments with limited network bandwidth.

[MQTT Client]
Select the MQTT client to use.


[Command]
Select the command to execute.

- Publish: Sends a message to a specific topic.
- Subscribe: Subscribes to a specific topic and requests subscribed messages. If already subscribed, only requests messages.
[Topic]
Enter the topic to publish or subscribe to messages. A topic represents the path or subject through which messages are delivered.

[QoS]
Select the QoS (Quality of Service) for the message to publish or subscribe. QoS represents the message service quality level in MQTT. Higher numbers provide greater reliability but consume more network resources.

- QoS 0: Sends the message without checking for a response from the recipient. Therefore, there is a possibility that the message may not be delivered.
- QoS 1: Continues sending messages if no response is received from the recipient. Therefore, there is a possibility of duplicate message transmission.
- QoS 2: Uses a four-way handshaking method to guarantee exactly-once message delivery.
[Message]
Enter the message to publish. Only displayed when [Command] is “Publish”.

[Message Retain]
Set whether to store the last message on the MQTT broker (server) when publishing a message. When new subscribers connect, they can immediately receive the stored message. Only displayed when [Command] is “Publish”.

[Max Wait Time]
Enter the maximum wait time for message reception when subscribing to messages. If this time is exceeded, it is considered that no message was received. Only displayed when [Command] is “Subscribe”.

[Receive Complete]
Select a variable to store reception completion status. When a new message is received, this variable becomes true, otherwise it becomes false. Only [Digital] type variables can be selected and only displayed when [Command] is “Subscribe”.

[Received Topic]
Select a variable to store the topic of the received message. Only [Text] type variables can be selected and only displayed when [Command] is “Subscribe”.

[Received Message]
Select a variable to store the received message. Only [Text] type variables can be selected and only displayed when [Command] is “Subscribe”.
