Comments (8)
Summarising all my questions again:
- Although we get CONNACK and SUBACK quickly, why is there a problem with PUBACK?
- If Azure SDK is re-trying to publish the same packet on reconnect, why is the IS_DUP property not set to true?
- We notice duplicate packets (sometimes even 20) in azure hub. Is this expected? How do we fix this, so I don't store duplicate packets in Azure Hub?
from azure-iot-sdk-c.
IOTHUB_CLIENT_CONNECTION_NO_NETWORK is the error we get in re-connect attempt failure.
from azure-iot-sdk-c.
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
from azure-iot-sdk-c.
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:
- This is usually caused by two separate processes or devices using the same identity when connecting to hub. By design, the last one connecting will kick out all other instances. Please verify a single process/device connects with this identity at any point in time.
- Please follow https://github.com/Azure/azure-iot-sdk-c#support to open a support ticket from your Azure subscription. We would need private information (such as IoT Hub, device ID, etc. that must not be shared on GitHub) in order to check server-side logs.
We will keep this issue active to track MQTT DUP handling.
from azure-iot-sdk-c.
@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.
from azure-iot-sdk-c.
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
from azure-iot-sdk-c.
Thanks. May I know when this fix will be available and in which official release?
We will plan accordingly. Thanks
from azure-iot-sdk-c.
The next LTS is Jan 2024.
https://github.com/Azure/azure-iot-sdk-c#lts-schedule
from azure-iot-sdk-c.
Related Issues (20)
- IoTHubDeviceClient_LL_SetRetryPolicy and IoTHubDeviceClient_LL_GetRetryPolicy documentation HOT 2
- Mininum guaranteed date for DPS-TPM's "work as-is" ? HOT 2
- Undefined references from iothub_client_properties.h when included in C++ source file HOT 3
- iothub_client_sample_mqtt_dm sample generates unsafe header/library path used in cross-compilation error HOT 1
- OPTION_MESSAGE_TIMEOUT client option depecation HOT 3
- IoTHubDeviceClient_LL_UploadMultipleBlocksToBlob() segfaults. HOT 4
- Does this SDK client support empty proxy username and password? HOT 2
- Version 1.12.0 does not have a git tag HOT 8
- IoTHubDeviceClient_UploadMultipleBlocksToBlob_Async can miss some errors HOT 14
- Async responses for Direct Methods HOT 11
- Azure SDK unreliably connecting to IoT Hub. Error reason: IOTHUB_CLIENT_CONNECTION_NO_NETWORK HOT 6
- Is it possible to connect a real robot (as a device client) to an IoT hub? HOT 3
- The version of the Provisioning API is not up to date HOT 2
- Does MQTT_Websockets support SAS authentication? HOT 2
- Convenience function DM callback
- Segmentation fault when uploading to blob on arm32 HOT 5
- LogError with null as a string (%s) HOT 13
- unit tests rely on unspecified order-of-evaluation bahavior HOT 2
- Segmentation fault during device to cloud message HOT 9
- LTS_03_2024 release/tag not part of lts_03_2024 branch HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-iot-sdk-c.