payload As String
Returns the payload decoded as a UTF-8 string.
Convenience accessor for the very common case of text-based MQTT payloads.
Example
client.messages.collect { msg ->
println("${msg.topic}: ${msg.payloadAsString()}")
}Content copied to clipboard