chickadee » mosquitto » mqtt-publish

mqtt-publish client topic payload #!key (qos 0) retainprocedure

Publish a message on a given topic.

  • topic: null terminated string of the topic to publish to.
  • payload: blob or string of data to send.
  • qos: integer value 0, 1 or 2 indicating the Quality of Service to be used for the message.
  • retain: set to #t to make the message retained.

returns:

  • mid: message id of sent message. Note that although the MQTT protocol doesn’t use message ids for messages with QoS=0, libmosquitto assigns them message ids so they can be tracked with this parameter.