更新
为了清楚起见,更新我的问题。
回购: https ://github.com/aaronprince05/IoTEdgeMessaging
我有 2 个模块:MessageGeneratorModule、MessageReceiverModule。
MessageGeneratorModule 发送:
批量发送 1000 条消息,然后等待 4 分钟
1 条消息/分钟,持续 2 分钟
,然后 1 条消息/秒,持续 1 分钟
,然后 20 条消息/秒,持续 1 分钟
MessageReceiverModule 是标准的 IoT Edge 模块样板代码,它只接收消息并记录它们。我已经删除了向上游发送消息的代码。
我在 IoT Edge 中有一个路由配置为
{
"routes": {
"myRoute": "FROM /messages/modules/messageGenerator/outputs/output INTO BrokeredEndpoint(\"/modules/messageReceiver/inputs/input1\")"
}
}
我在这里遇到了某种类型的限制,消息似乎没有立即传递给接收者。相反,大约有 10-20 条消息被传递。下一组 10 条消息可以通过发送另一条消息来触发接收器来强制。(注意下面的时间戳)
Added Cert: /mnt/edgemodule/edge-device-ca.cert.pem
Connection String <my connection string>
IoT Hub module client initialized.
[12/19/2017 18:27:08] Received message: 1, Body: [1]
[12/19/2017 18:27:08] Received message: 2, Body: [2]
[12/19/2017 18:27:08] Received message: 3, Body: [3]
[12/19/2017 18:27:08] Received message: 4, Body: [4]
[12/19/2017 18:27:08] Received message: 5, Body: [5]
[12/19/2017 18:27:08] Received message: 6, Body: [6]
[12/19/2017 18:27:08] Received message: 7, Body: [7]
[12/19/2017 18:27:08] Received message: 8, Body: [8]
[12/19/2017 18:27:08] Received message: 9, Body: [9]
[12/19/2017 18:27:08] Received message: 10, Body: [10]
[12/19/2017 18:27:08] Received message: 11, Body: [11]
[12/19/2017 18:27:08] Received message: 12, Body: [12]
[12/19/2017 18:27:08] Received message: 13, Body: [13]
[12/19/2017 18:27:08] Received message: 14, Body: [14]
[12/19/2017 18:27:08] Received message: 15, Body: [15]
[12/19/2017 18:27:08] Received message: 16, Body: [16]
[12/19/2017 18:27:08] Received message: 17, Body: [17]
[12/19/2017 18:27:08] Received message: 18, Body: [18]
[12/19/2017 18:27:08] Received message: 19, Body: [19]
[12/19/2017 18:27:08] Received message: 20, Body: [20]
[12/19/2017 18:27:08] Received message: 21, Body: [21]
[12/19/2017 18:30:59] Received message: 22, Body: [22]
[12/19/2017 18:30:59] Received message: 23, Body: [23]
[12/19/2017 18:30:59] Received message: 24, Body: [24]
[12/19/2017 18:30:59] Received message: 25, Body: [25]
[12/19/2017 18:30:59] Received message: 26, Body: [26]
[12/19/2017 18:30:59] Received message: 27, Body: [27]
[12/19/2017 18:30:59] Received message: 28, Body: [28]
[12/19/2017 18:30:59] Received message: 29, Body: [29]
[12/19/2017 18:30:59] Received message: 30, Body: [30]
[12/19/2017 18:30:59] Received message: 31, Body: [31]
[12/19/2017 18:31:59] Received message: 32, Body: [32]
[12/19/2017 18:31:59] Received message: 33, Body: [33]
[12/19/2017 18:31:59] Received message: 34, Body: [34]
其余的日志可以在 repo 中找到。您应该能够拉下代码并运行它以查看异常情况。