1.2.3.20 SYS_MQTT_Unsubscribe Function

C

int32_t SYS_MQTT_Unsubscribe(SYS_MODULE_OBJ obj, char *subTopic);

Summary

Returns success/ failure for the unsubscribing to a Topic by the user.

Description

This function is used for Unsubscribing from a Topic.

Precondition

SYS_MQTT_Connect should have been called before calling this function

Parameters

ParamDescription
objSYS MQTT object handle, returned from SYS_MQTT_Connect subtopic - Topic from which to unsubscribe

Returns

SYS_MQTT_SUCCESS - Indicates that the Request was catered to successfully

SYS_MQTT_FAILURE - Indicates that the Request failed

Example

// Handle "objSysMqtt" value must have been returned from SYS_MQTT_Connect.
if( SYS_MQTT_Unsubscribe(objSysMqtt, "house/temperature/first_floor/kitchen") == SYS_MQTT_SUCCESS)
{
}