MqttClient.publish

Publishes the message on the specified topic

class MqttClient
final
void
publish
(
T
)
(
in string topic
,
in T payload
,,
bool retain = false
)
if (
isSomeString!T ||
(
isArray!T &&
is(ForeachType!T : ubyte)
)
)

Parameters

topic string

Topic to send message to

payload T

Content of the message

qos QoSLevel

Required QoSLevel to handle message (default is QoSLevel.AtMostOnce)

retain bool

If true, the server must store the message so that it can be delivered to future subscribers

Meta