Function esp_ward::connectivity::mqtt::mqtt_subscribe

source ·
pub async fn mqtt_subscribe<'a>(
    client: &mut MqttClient<'a, TcpSocket<'a>, 5, CountingRng>,
    topic_name: &'a str
)
Expand description

Subscribes to an MQTT topic.

§Arguments

  • client - A mutable reference to the MQTT client used for the subscription.
  • topic_name - The MQTT topic to which the client will subscribe.

This function attempts to subscribe to the topic and retries in case of network errors.