AWS IoT Device SDK C: MQTT
MQTT 3.1.1 client library
Return to main page ↑
IotMqttSubscription_t Struct Reference

MQTT subscription. More...

#include <iot_mqtt_types.h>

Data Fields

IotMqttQos_t qos
 QoS of messages delivered on subscription. More...
 
const char * pTopicFilter
 Topic filter of subscription.
 
uint16_t topicFilterLength
 Length of IotMqttSubscription_t.pTopicFilter.
 
IotMqttCallbackInfo_t callback
 Callback to invoke when a message is received. More...
 

Detailed Description

MQTT subscription.

Parameter for: IotMqtt_SubscribeAsync, IotMqtt_UnsubscribeAsync, IotMqtt_SubscribeSync, IotMqtt_UnsubscribeSync

An array of these is passed to IotMqtt_SubscribeAsync and IotMqtt_UnsubscribeAsync. However, IotMqttSubscription_t.callback and and IotMqttSubscription_t.qos are ignored by IotMqtt_UnsubscribeAsync.

All instances of IotMqttSubscription_t should be initialized with IOT_MQTT_SUBSCRIPTION_INITIALIZER.

Note
The lengths of the strings in this struct should not include the NULL terminator. Strings in this struct do not need to be NULL-terminated.
See also
IotMqttCallbackInfo_t for details on setting a callback function.

Field Documentation

◆ qos

IotMqttQos_t IotMqttSubscription_t::qos

QoS of messages delivered on subscription.

Must be 0 or 1. Ignored by IotMqtt_UnsubscribeAsync.

◆ callback

IotMqttCallbackInfo_t IotMqttSubscription_t::callback

Callback to invoke when a message is received.

See IotMqttCallbackInfo_t. Ignored by IotMqtt_UnsubscribeAsync.


The documentation for this struct was generated from the following file: