azure-iot-hubazure-iot-edgeazure-iot-sdk

Does Azure IoT Edge module receive a twin patch when it starts up?


Is it normal for an IoT Edge Module to receive a twin patch everytime it starts up?

Imagine this scenario:

Does example_module receive a patch when it starts up after the crash?


Solution

  • Yes, that's exactly what happens.

    The scenario you described the example_module restarts after a crash, it would receive a patch containing the latest desired properties. The IoT Edge runtime maintains the desired properties state for each module, and when a module starts or restarts, it syncs up its state with the desired properties from the edgeAgent. This behaviour ensures the module is always in sync with the desired state defined in its module twin, even after crashes or restarts.