vertx / io.vertx.rxjava.mqtt / MqttClient / publish

# publish

`open fun publish(topic: String, payload: Buffer, qosLevel: MqttQoS, isDup: Boolean, isRetain: Boolean): MqttClient`

Sends the PUBLISH message to the remote MQTT server

### Parameters

`topic` - topic on which the message is published

`payload` - message payload

`qosLevel` - QoS level

`isDup` - if the message is a duplicate

`isRetain` - if the message needs to be retained

Return
current MQTT client instance

`open fun publish(topic: String, payload: Buffer, qosLevel: MqttQoS, isDup: Boolean, isRetain: Boolean, publishSentHandler: Handler<AsyncResult<Int>>): MqttClient`

Sends the PUBLISH message to the remote MQTT server

### Parameters

`topic` - topic on which the message is published

`payload` - message payload

`qosLevel` - QoS level

`isDup` - if the message is a duplicate

`isRetain` - if the message needs to be retained

`publishSentHandler` - handler called after PUBLISH packet sent with packetid (not when QoS 0)

Return
current MQTT client instance