-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate messages seen in Azure IoT Hub #2514
Comments
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. Kindly help us in solving this issue. Thanks |
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
@acode-x , @gopicisco The main issue is caused by rapid reconnects. I see 4 reconnects / second:
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. |
Unfortunately telemetry messages that are resent by the MQTT transport are not marked with the DUP flag as TRUE (as should by spec MQTT-3.3.1-2). Note that telemetry messages are always sent by the azure-iot-sdk-c MQTT transport with QOS1, so no control is necessary for the DUP flag related to QOS0. azure-iot-sdk-c's MQTT transport does not attempt ot resend TWIN messages or direct methods responses, so this fix does not apply to these messaging features. Related issue: #2514
Unfortunately telemetry messages that are resent by the MQTT transport are not marked with the DUP flag as TRUE (as should by spec MQTT-3.3.1-2). Note that telemetry messages are always sent by the azure-iot-sdk-c MQTT transport with QOS1, so no control is necessary for the DUP flag related to QOS0. azure-iot-sdk-c's MQTT transport does not attempt ot resend TWIN messages or direct methods responses, so this fix does not apply to these messaging features. Related issue: #2514
Thanks. May I know when this fix will be available and in which official release? |
The next LTS is Jan 2024. https://github.com/Azure/azure-iot-sdk-c#lts-schedule |
@ericwolz @ewertons |
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
The text was updated successfully, but these errors were encountered: