Closed acode-x closed 1 year ago
Summarising all my questions again:
IOTHUB_CLIENT_CONNECTION_NO_NETWORK is the error we get in re-connect attempt failure.
This issue is seen frequently in our customer setup and causing a major problem of message quota getting filled up quickly due to burst of same messages delivered multiple times when any reconnects are seen frequently. When the same packet id is resent, not sure why azure c sdk client is sending with IS_DUP=false and server side should be able to detect that it is a duplicate pkt by using this packet id ?
Kindly help us in solving this issue. Thanks
Is seeing the duplicate messages in Azure Hub expected behaviour when we use QoS 1? If so, could you guide me how to use QoS 2?
IoT Hub does not support QoS 2.
Based on the logs, it appears we do have a problem setting the DUP flag. @ewertons @ericwol-msft From the spec:
The DUP flag MUST be set to 1 by the Client or Server when it attempts to re-deliver a PUBLISH Packet [MQTT-3.3.1.-1]. The DUP flag MUST be set to 0 for all QoS 0 messages [MQTT-3.3.1-2].
@acode-x , @gopicisco The main issue is caused by rapid reconnects. I see 4 reconnects / second:
01:30:07 CONNECT
01:30:07 CONNECT
01:30:08 CONNECT
01:30:08 CONNECT
One immediate mitigation while we work on a fix, would be to switch the protocol from MQTT to AMQP and check if you still see duplicates.
We need more information to repro/analyze why this is happening:
We will keep this issue active to track MQTT DUP handling.
@acode-x No more information for the last 2 weeks. Closing for now. Please feel free to add more information here and we can re-open the issue.
The lack of DUP flag on resent telemetry messages is now fixed in the azure-iot-sdk-c (@main). If you still see issues with duplicate messages on event hub, please file a service request as recommended by @CIPop
Thanks. May I know when this fix will be available and in which official release? We will plan accordingly. Thanks
The next LTS is Jan 2024.
@ericwolz @ewertons We are observing this issue now for AMQP also for 2019-05-16 version of the azure-iot-sdk-c. We see some messages even after receiving successful from sdk, are getting pushed multiple times (2 to 50s) in over 8-hour duration. I can't see similar fix in AMQP code. Is it really fixed with latest version of SDK, so that we can update our sdk to get it fixed?
Hi,
I am using
IoTHubDeviceClient_SendEventAsync
to push messages to Azure IoT Hub every 1min.We notice that some messages are sent multiple times, and there are duplicate entries created in Azure Hub for the same message. Also, it reconnects quite often (not sure if bandwidth is a problem here as CONNACK and SUBACK is quickly received). This scenario occurs multiple times a day for quite some time. Is seeing the duplicate messages in Azure Hub expected behaviour when we use QoS 1? If so, could you guide me how to use QoS 2?
Attaching logs for reference.
Note: The packetID doesn't change, unless there are some message timeouts.
Requesting your help on same. Thanks