Function esp_ward::connectivity::mqtt::mqtt_send
source · pub async fn mqtt_send<'a>(
client: &mut MqttClient<'a, TcpSocket<'a>, 5, CountingRng>,
topic_name: &'a str,
message: &'a [u8]
)
Expand description
This function attempts to send the message to a specific MQTT topic and retries in case of network errors.
§Arguments
client
- A mutable reference to the MQTT client used for sending the message.topic_name
- The MQTT topic to which the message will be sent.message
- The message payload as a string slice.