# MQTT Subscribe

> Kalipso Studio 6.1 documentation · https://doc.sysdevmobile.com/kalipso/6.1/documentation/actions/group-communications/mqtt-subscribe
>
> Subscribes to an MQTT topic, with + and # wildcards and QoS level; incoming messages are handled in the MQTT Message received event.

Subscribe to a topic on an MQTT broker using a connection previously opened with **MQTT Connect**. Incoming messages for the subscribed topic are handled in the **MQTT Message received** event.

Action available for the following operating systems:

![OS Supported: Android, iOS, Win, Win32](https://doc.sysdevmobile.com/kalipso/assets/images/01_Supported_OS-5c02a51fd5080a410a07ee3ef72b6872.png)

## Parameters

* **MQTT ID** _\<numeric> -_ The identifier of the MQTT connection to use. This must match the **Target MQTT ID** used in **MQTT Connect**.
* **Topic** _\<string> -_ The topic to subscribe to. Wildcards are supported:
  * `+` - matches a single topic level (e.g. `sensors/+/temperature`).
  * `#` - matches any number of topic levels and must be the last character (e.g. `sensors/#`).
* **Quality of Service** _\<unquoted string> -_ The maximum QoS level the broker will use to deliver messages for this subscription:
  * **At most once** (QoS 0) - Messages are delivered at most once. No acknowledgment.
  * **At least once** (QoS 1) - Messages are delivered at least once. Duplicates are possible.
  * **Exactly once** (QoS 2) - Messages are delivered exactly once. Slowest but guarantees no loss or duplication.

:::info
When a message is received for a subscribed topic, the **MQTT Message received** event is triggered and the target variables defined in **MQTT Connect** (**Target Notification MQTT ID**, **Target Notification Topic** and **Target Notification Payload**) are updated with the message details.
:::
