--- title: "send MQTT message()" slug: "basic-mqtt" updated: 2026-08-12T12:01:12Z published: 2026-08-12T12:01:12Z canonical: "docs.lobstersoftware.com/basic-mqtt" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # send MQTT message() This function sends a message to MQTT server alias **a**, using topic **b** and payload **c**. Returns *true* on success. ## Parameters | Parameter | Description | | --- | --- | | a | The MQTT alia (see [MQTT connections](/v1/docs/en/manage-mqtt)). | | b | The topic to send to. | | c | The data to be sent. | | d | The encoding for the payload **c**. **NOTE:** You can use the three dots for selection. | | e | The quality of service (*1-3*, where *1*=*At most once*, *2=At least once*, *3=Exactly once*). | ## System variables In MQTT version 5, you can use system variables of the form MQTT_ to pass user properties (key, value). See also MQTT_SYS_CONTENTTYPE and MQTT_SYS_CORRELATIONDATA. A lightweight publish-subscribe protocol for IoT and machine-to-machine communication. MQTT transmits messages via topics and is optimized for environments with low bandwidth or unstable connections.