davidepianca98/KMQTT

Is it possible to add a path in MqttClient?

Closed this issue · 2 comments

My MQTT broker URL is ws://broker.emqx.io:8083/mqtt.
How can I specify the "/mqtt" path in the MQTTClient?

Hello, it is not yet possible, I will add the functionality when I have time. Anyway I tried to connect like this and it seems to be working anyway:

val client = MQTTClient(
    MQTTVersion.MQTT5,
    "broker.emqx.io",
    8083,
    null,
    15,
    webSocket = true
) {
    println(it.payload?.toByteArray()?.decodeToString())
}

Added in 87b2033. Will be available in the next release