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

Return
current 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

Return
current MQTT client instance *