Functioning of the edgeHub Module in IoT Edge Devices for Queued Data in Various Scenarios

Roshan Thomas(UST,IN) 0 Reputation points
2023-11-24T19:04:57.87+00:00

Greetings,

I'm seeking insights on specific scenarios within an IoT Edge Device:

  • Scenario 1 - If a device loses power while sending data to IoTHub, and then regains power, does the data queue or get dropped?

Observation - Our testing suggests data loss; can you confirm this behavior?

  • Scenario 2 - When a device loses network connectivity while sending data to IoTHub and later reconnects but fails to connect to the IoT Hub for unknown reasons, what happens to the data?

Observation - Our testing indicates data loss.

  • Scenario 3 - When executing the IoT command "sudo iotedge restart," does the data in edgeHub get dropped or flushed to IoT Hub? Please provide a brief explanation.

Observation - Our testing indicates that in these scenarios, data either gets dropped or isn't flushed to IoT Hub. Any insights on this behavior would be appreciated.

Thank you!

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
401 questions
Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
576 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 33,046 Reputation points MVP
    2023-11-24T23:47:56.6633333+00:00

    Hello @Roshan Thomas(UST,IN),

    welcome to this moderated Azure community forum.

    You have a lot of questions about Azure IoT Edge. Great.

    Are you aware of the many free learning modules available on MS Learn about this topic?

    Regarding the dataloss, you can track everything happening within the modules and on the routing.

    Messages from custom modules are sent to other modules or to the cloud (via the EdgeHub) via the internal routing. This routing is persisted for a certain time (you can set it in the deployment manifest). These survive a restart. Data still being executed within your module could be persisted depending the custom logic.

    Sudo iotedge restart has a disruptive behavior on the edgeAgent and edgeHub. Check the logging of both modules. There you see this is done in a graceful way.

    Data messages are always sent/flushed to IoT Hub when a connection is available.

    Messages are only dropped locally when the retention time is passed, probably because the device is disconnected for a longer period.

    Take some time to read through the documentation of the offline capabilities too.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.