MQTT Vuser Functions

MQTT (MQ Telemetry Transport) is a publish/subscribe-based messaging protocol for use over the TCP/IP protocol. The protocol is optimized for small bandwidth or unstable networks. It is most commonly used for device-to-device communication as in the Internet of things (IoT).

Alphabetical List of Functions

Function nameDescription
mqtt_await_messagesWaits until there is at least one message in the inbox.
mqtt_clear_inboxDiscards all messages in the inbox.
mqtt_connectEstablishes connection.
mqtt_createCreates a new connection and returns its handle.
mqtt_disconnectDisconnects the client from the server.
mqtt_free_messageReleases memory where message is stored.
mqtt_get_lengthReturns the message payload length.
mqtt_get_payloadReturns the message payload.
mqtt_get_topicReturns the message topic.
mqtt_publishPublishes a message.
mqtt_read_inboxReads one message from the inbox and removes the message.
mqtt_set_client_idSets the MQTT Client ID.
mqtt_set_credentialsSets the user name and password.
mqtt_set_lwtSets the Last Will and Testament message.
mqtt_set_tls_certificateSets the TLS private key file, certificate file and the private key password.
mqtt_set_tls_parametersSets the TLS version and cipher list.
mqtt_subscribeSubscribes the client to a topic.
mqtt_unsubscribeUnsubscribes the client from a topic.