publish

open override fun publish(topic: String, data: ByteArray, retained: Boolean)(source)

Publishes a message to the given MQTT topic.

Parameters

topic

The MQTT topic to publish to.

data

The binary payload.

retained

Whether the message should be retained by the broker.