Azure IoT中心AMQP通信复用 [英] Azure IoT Hub AMQP Communication Multiplexing

查看:104
本文介绍了Azure IoT中心AMQP通信复用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在某些 Microsoft文档中它与Azure IoT集线器一起使用时提到,在多个简单设备与功能强大的本地集线器设备进行通信的本地集线器设备进行通信的情况下,可以在单个TLS连接下(使用AMQP协议)复用多个设备的通信.物联网中心是否有任何示例说明如何实现这种多路复用? DeviceClient库似乎不支持此功能(尽管我可以错误的).也曾提到过针对这种情况的IoT Gateway SDK,但我还没有找到一个清晰的示例说明如何使用两者来设置多路复用.任何建议或对其他材料的引用将不胜感激.

In some of the Microsoft documentation for working with Azure IoT hubs, it mentions that it is possible to multiplex the communication of multiple devices under a single TLS connection (using the AMQP protocol) for scenarios where multiple simple devices talk to a local hub device that is powerful enough to communicate with the IoT Hub. Are there any examples of how one would implement this multiplexing? The DeviceClient library does not appear to support this (although I could be wrong). There have also been mentions of the IoT Gateway SDK for this scenario, but I haven't found a clear example of how to set multiplexing up using that either. Any advice or references to other material would be appreciated.

推荐答案

我最近建立了这样的体系结构,也许它将对您有所帮助. 我们的玩家:

I've recently built such an architecture, maybe it will help you as a reference. Our players:

  • 现场网关-一个足够强大的本地集线器,可以处理与IoT集线器的通信并从边缘传感器接收数据.
  • 边缘传感器-无法直接连接到IoT中心但实现一些通信协议的设备,这些设备使它们能够 连接到现场网关(Zwave,Zigbee ...).
  • IoT中心-处理现场网关和中心之间的D2C和C2D.
  • 后端服务器-从IoT中心接收数据.
  • Field Gateway - A local hub that is strong enough to handle communication to the IoT Hub and receive data from edge sensors.
  • Edge Sensors - devices that are unable to connect directly to the IoT Hub but implement some communication protocol that enable them to connect to the field gateway(Zwave, Zigbee...).
  • IoT Hub - Handles the D2C and C2D between the Field Gateway and the Hub.
  • Back end server - Receives the data from the IoT Hub.

边缘传感器将遥测发送到现场网关.现场网关维护与IoT中心的连接,而IoT中心知道的唯一设备是现场网关.

The Edge Sensor sends their telemetry to the Field Gateway. The Field Gateway maintains a connection to the IoT Hub and the only device that the IoT Hub knows is the Field Gateway.

在现场网关中从边缘传感器接收到的每个遥测都在消息有效负载中包含唯一的ID.

Each telemetry that is being received in the Field Gateway from the Edge Sensors contains a unique id in the message payload.

在IoT中心中接收到消息时,IoT中心仅了解现场网关.但是,当消息由后端处理时,它将从有效负载中获取唯一的ID,因此知道哪个是发送遥测的正确设备.

When the message is being received in the IoT Hub, The IoT Hub knows only about the Field Gateway. But when the message is being processed by the Back End it takes the unique id from the payload and therefore knows which is the correct device that sent the telemetry.

因此,我们有多个设备都在一个连接上骑".

So we have multiple devices that are all "riding" on one connection.

希望这会有所帮助.

这篇关于Azure IoT中心AMQP通信复用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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