AWS IoT Embedded C Device SDK
Functions
aws_iot_mqtt_client_unsubscribe.c File Reference

MQTT client unsubscribe API definitions. More...

#include "aws_iot_mqtt_client_common_internal.h"

Functions

IoT_Error_t aws_iot_mqtt_unsubscribe (AWS_IoT_Client *pClient, const char *pTopicFilter, uint16_t topicFilterLen)
 Unsubscribe to an MQTT topic. More...
 

Function Documentation

IoT_Error_t aws_iot_mqtt_unsubscribe ( AWS_IoT_Client pClient,
const char *  pTopicFilter,
uint16_t  topicFilterLen 
)

Called to send an unsubscribe message to the broker requesting removal of a subscription to an MQTT topic.

Note
Call is blocking. The call returns after the receipt of the UNSUBACK control packet. This is the outer function which does the validations and calls the internal unsubscribe above to perform the actual operation. It is also responsible for client state changes
Parameters
pClientReference to the IoT Client
pTopicNameTopic Name to publish to
topicNameLenLength of the topic name
Returns
An IoT Error Type defining successful/failed unsubscribe call