vertx / io.vertx.kotlin.mqtt / io.vertx.mqtt.MqttClient / subscribeAwait

# subscribeAwait

`suspend fun MqttClient.subscribeAwait(topic: String, qos: Int): Int`

Subscribes to the topic with a specified QoS level

### Parameters

`topic` - topic you subscribe on

`qos` - QoS level

`subscribeSentHandler` - handler called after SUBSCRIBE packet sent with packetid

Returncurrent
MQTT client instance *

`suspend fun MqttClient.subscribeAwait(topics: Map<String, Int>): Int`

Subscribes to the topic and adds a handler which will be called after the request is sent

### Parameters

`topics` - topics you subscribe on

`subscribeSentHandler` - handler called after SUBSCRIBE packet sent with packetid

Returncurrent
MQTT client instance *