Giter Site home page Giter Site logo

Comments (8)

acode-x avatar acode-x commented on June 11, 2024 1

Summarising all my questions again:

  1. Although we get CONNACK and SUBACK quickly, why is there a problem with PUBACK?
  2. If Azure SDK is re-trying to publish the same packet on reconnect, why is the IS_DUP property not set to true?
  3. 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.

acode-x avatar acode-x commented on June 11, 2024

IOTHUB_CLIENT_CONNECTION_NO_NETWORK is the error we get in re-connect attempt failure.

from azure-iot-sdk-c.

gopicisco avatar gopicisco commented on June 11, 2024

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.

CIPop avatar CIPop commented on June 11, 2024

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:

  1. 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.
  2. 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.

CIPop avatar CIPop commented on June 11, 2024

@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.

ewertons avatar ewertons commented on June 11, 2024

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.

gopicisco avatar gopicisco commented on June 11, 2024

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.

ericwol-msft avatar ericwol-msft commented on June 11, 2024

The next LTS is Jan 2024.

https://github.com/Azure/azure-iot-sdk-c#lts-schedule

from azure-iot-sdk-c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.