Un servizio di virtualizzazione di Microsoft desktop e app eseguito in Azure. Precedentemente noto come Desktop virtuale Windows.
Duplicate Messages in Azure IoT Hub – Need to Inspect MQTT Message Header
We are experiencing an issue with duplicate messages when using Azure IoT Hub. Our setup involves an IoT device equipped with a Quectel module, which communicates with Azure IoT Hub via MQTT. We retrieve the messages from IoT Hub using the native Event Hub endpoint.
Our concern is that we are receiving duplicate messages, and we suspect this behavior is related to the MQTT Quality of Service (QoS) level 1, which guarantees message delivery at least once. This could result in multiple deliveries if the cloud acknowledgment (ACK) is lost.
To better understand the root cause, we need to inspect the low-level MQTT message header. Specifically, we are looking for the Duplicate flag in the MQTT control byte, which should be the first byte of the message structure:
- 4 MSB: Message type (for PUBLISH, this should be 3).
- 4 LSB: Control flags:
- Bit 3: Duplicate message flag.
- Bits 1-2: QoS level.
- Bit 0: Retain flag.
- Bits 1-2: QoS level.
- Bit 3: Duplicate message flag.
From our recent tests, we have strong evidence that this issue originates from the MQTT stack implementation in the modem. The most likely scenario is that the modem keeps retransmitting the message until it receives at least one ACK. If multiple messages were already sent, they might still be delivered even after the first ACK is received. The only way to avoid this would be to use QoS 2, which Azure does not seem to support.
To confirm this hypothesis, we need to check the raw MQTT message headers on the cloud side. If we can access this data, we can determine whether the duplicate messages are due to the MQTT QoS 1 behavior. Additionally, the fact that this issue occurs more frequently in areas with poor network coverage further supports our assumption.
Since duplicate messages pose a significant issue for our system and there is no support for QoS 2, we need a way to verify the MQTT headers to analyze the message flow properly. Can you provide us with a way to inspect this data from the Azure IoT Hub side?
Desktop virtuale Azure
1 risposta
Ordina per: Meno recente
-
Eliminata
Questa risposta è stata eliminata a causa di una violazione del codice di comportamento. La risposta è stata segnalata manualmente o identificata tramite il rilevamento automatizzato prima dell'esecuzione dell'azione. Per ulteriori informazioni, fai riferimento al codice di comportamento.
I commenti sono stati disattivati. Ulteriori informazioni