英文:
Does Azure IoT Edge module receive a twin patch when it starts up?
问题
每次 IoT 边缘模块启动时都接收到孪生补丁是正常的吗?
想象一下这种情况:
- IoT 边缘配置在本地虚拟机上
- 在 example_module 的孪生期望属性中添加了一个属性
- example_module 接收到一个补丁,并根据接收到的补丁设置其环境变量,并报告属性
- 由于与无关的问题,example_module 崩溃并重新启动
在崩溃后重新启动时,example_module 是否会接收到一个补丁?
英文:
Is it normal for an IoT Edge Module to receive a twin patch everytime it starts up?
Imagine this scenario:
- IoT edge is configured in an On-prem VM
- A property is added into example_module's twin desired properties
- example_module receives a patch and sets its environmental variables based on the patch received and reports back the properties
- example_module crashes due to an unrelated issue and restarts
Does example_module receive a patch when it starts up after the crash?
答案1
得分: 1
是的,这正是发生的情况。
您描述的情况是,example_module
在崩溃后重新启动,它将接收一个包含最新期望属性的补丁。IoT Edge 运行时会维护每个模块的期望属性状态,当一个模块启动或重新启动时,它会将其状态与edgeAgent
中的期望属性同步。这种行为确保模块始终与其模块双生子中定义的期望状态保持同步,即使在崩溃或重新启动后也是如此。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论