MQTT API Reference
MQTT 3.1.1 client library
IotMqtt_TimedUnsubscribe

Unsubscribes from a given array of topic filters with a timeout.

const IotMqttSubscription_t * pSubscriptionList,
size_t subscriptionCount,
uint32_t flags,
uint32_t timeoutMs );

This function transmits an MQTT UNSUBSCRIBE packet to the server, then waits for a server response to the packet. Internally, this function is a call to IotMqtt_Unsubscribe followed by IotMqtt_Wait. See IotMqtt_Unsubscribe for more information about the MQTT UNSUBSCRIBE operation.

Parameters
[in]mqttConnectionThe MQTT connection used for the subscription.
[in]pSubscriptionListPointer to the first element in the array of subscriptions.
[in]subscriptionCountThe number of elements in pSubscriptionList.
[in]flagsFlags which modify the behavior of this function. See MQTT Function Flags. Currently, flags are ignored by this function; this parameter is for future-compatibility.
[in]timeoutMsIf the MQTT server does not acknowledge the UNSUBSCRIBE within this timeout, this function returns IOT_MQTT_TIMEOUT.
Returns
One of the following: