Azure / azure-iot-sdk-c

A C99 SDK for connecting devices to Microsoft Azure IoT services
https://azure.github.io/azure-iot-sdk-c
Other
580 stars 738 forks source link

What is the QoS when using MQTT as transport? #2623

Open bertulli opened 4 weeks ago

bertulli commented 4 weeks ago

Hi, thank you for your work. I'm incorporating the Azure IoT SDK into one of our company project, and I needed to know what is the quality of service level implemented by MQTT in the SDK. Searching in the docs / .md files, I found no clear answer. However, I found some issue answers that seems to clarify that the QoS for the SDK is 1 (at least once), and that the SDK doesn't support QoS 2 (and I think neither QoS 0?). However searching in the source code (specifically in iothub_client/src/iothubtransport_mqtt_common.c) I see references to QoS 0 sometimes. So I have two questions:

  1. for the "user" data (that is, messages created and sent using the SDK, can you confirm the QoS is 1 (at least once)?
  2. why isn't the QoS specified in the docs? I feel like it could be of interested for other users. Maybe it could be added in the "Key features > Device client SDK" section of the README?

Thank you for your time!

ericwol-msft commented 4 weeks ago

IoT MQTT protocol is documented here:

https://learn.microsoft.com/en-us/azure/iot/iot-mqtt-connect-to-iot-hub#samples-using-mqtt-without-an-azure-iot-sdk