AWS IoT Device SDK C: Shadow
AWS IoT Device Shadow library
Return to main page ↑
AwsIotShadow_RemovePersistentSubscriptions

Remove persistent Thing Shadow operation topic subscriptions.

const char * pThingName,
size_t thingNameLength,
uint32_t flags );

Passing the flag AWS_IOT_SHADOW_FLAG_KEEP_SUBSCRIPTIONS to AwsIotShadow_DeleteAsync, AwsIotShadow_GetAsync, AwsIotShadow_UpdateAsync, or their blocking versions. causes the Shadow operation topic subscriptions to be maintained for future calls to the same function. If a persistent subscription for a Shadow topic are no longer needed, this function may be used to remove it.

Parameters
[in]mqttConnectionThe MQTT connection associated with the persistent subscription.
[in]pThingNameThe Thing Name associated with the persistent subscription.
[in]thingNameLengthThe length of pThingName.
[in]flagsFlags that determine which subscriptions to remove. Valid values are the bitwise OR of the following individual flags:
Returns
On success:
If an MQTT UNSUBSCRIBE packet cannot be sent, one of the following:
Note
AwsIotShadow_Cleanup removes all persistent subscriptions as well.
Warning
This function is not safe to call with any in-progress operations! It also does not affect delta and updated callbacks registered with AwsIotShadow_SetDeltaCallback and AwsIotShadow_SetUpdatedCallback, respectively. (See documentation for those functions on how to remove their callbacks).