struct MessageArrivedEvent

Library: IoT/MQTT
Package: MQTTClient
Header: IoT/MQTT/MQTTClient.h


Event arguments for MQTTClient::messageArrived.



bool dup;

The dup flag indicates whether or not this message is a duplicate. It is only meaningful when receiving QoS1 messages. When true, the client application should take appropriate action to deal with the duplicate message.


bool handled;

The handled flag must be set by the event delegate after processing of the message to indicate whether the message has been successfully processed. If set to false, the MQTT client will attempt to deliver the message again. The handled flag defaults to true. If the event delegate throws, the handled flag will be set to false by the framework. This means that in most cases the delegate does not need to concern itself with this flag.


Message message;

The published message.


std::string topic;

The topic the message has been published to.

Securely control IoT edge devices from anywhere   Connect a Device