接收所有IoTEdge模块的事件 [英] Receives Events For All IoTEdge Modules

查看:54
本文介绍了接收所有IoTEdge模块的事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我配置了我的IoTEdge设备,比如edgeDevice1。



我添加了自定义模块,比如module1。

I have configured my IoTEdge device, say edgeDevice1.

I have added custom module, say module1.

当我为module1创建ModuleClient时,我应该仅接收该模块的DeviceConnected事件。

When I creates ModuleClient for module1, I should receive DeviceConnected event for that module only.

问题是:我收到以下模块的DeviceConnected事件:

- edgeAgent

But Problem is: I receives DeviceConnected event for following modules:
- edgeAgent

- edgeHub

- edgeHub

- module1

- module1

文档说:  ; 要接收设备连接和设备断开事件,您必须打开设备的D2C链接或C2D链接。

Documentation says: To receive device connected and device disconnected events, you must open the D2C link or C2D link for your device.

我的一位同事说 edgeHub abd edgeAgent还与IoTHub连接

One of the my collegue said that edgeHub abd edgeAgent also makes connection with IoTHub.

这是否意味着每当从设备/模块打开D2C链接时,DeviceConnected事件为发表了?

Does it mean that whenever D2C link is opened from Device/Module, DeviceConnected event is published?

所以我假设由于上述情况,我收到所有这些模块的事件。

So I assume that due to above mentioned case, I am receiving event for all these modules.

参考文献

-   https:// do cs.microsoft.com/en-us/azure/iot-hub/iot-hub-event-grid#event-types

-   https://docs.microsoft.com/en- us / azure / iot-hub / iot-hub-event-grid#restrictions-for-device-connected-and-device-disconnected-events

https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-event-grid#event-types
- https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-event-grid#limitations-for-device-connected-and-device-disconnected-events

推荐答案

嗨Ravindra,

Hi Ravindra,

感谢您分享此内容。由于您引用的文档位于IoT-Hub下,因此使用IoTEdge时的行为可能会有所不同。让我在内部研究这是否是预期的行为。 

Thanks for sharing this. As the documentation that you referenced is under IoT-Hub the behavior may be different for when using IoTEdge. Let me research internally if this is the expected behavior. 

您是否认为EventGrid接收所有三个模块的DeviceConnected | DeviceDisconnected是一个问题?所有IoTEdge设备都依赖于edgeAgent和edgeHub - >请参阅IoTEdge Runtime的架构
此处

Do you see it as a problem that EventGrid receives DeviceConnected|DeviceDisconnected for all the three modules? All IoTEdge devices have allways the edgeAgent and edgeHub -> See the architecture of IoTEdge Runtime here.

谢谢!


这篇关于接收所有IoTEdge模块的事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆