MQTT API Reference
MQTT 3.1.1 client library
IotMqttSubscription_t Struct Reference

Information on an 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

Information on an MQTT subscription.

Parameter for: IotMqtt_Subscribe, IotMqtt_Unsubscribe

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

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_Unsubscribe.

◆ callback

IotMqttCallbackInfo_t IotMqttSubscription_t::callback

Callback to invoke when a message is received.

See IotMqttCallbackInfo_t. Ignored by IotMqtt_Unsubscribe.


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