[英]AWS IoT - Sending a message to a specific device of the fleet
I'm trying to play with AWS IoT to communicate with multiple identical devices. 我正在尝试使用AWS IoT与多个相同的设备进行通信。
So far, so good, all my devices are connected to it, and the only difference between them could be a single device ID (like a mac address or a serial number) 到目前为止,到目前为止,我所有的设备都已连接到其上,它们之间的唯一区别可能是单个设备ID(例如mac地址或序列号)
Now I'd like to send a message to a single specific device using its device ID and I don't know if there is a good way to do that? 现在,我想使用其设备ID将消息发送到单个特定设备,但我不知道是否有很好的方法?
I could make each device to subscribe to a topic like /<DEVICE_ID>
, however it doesn't seem like a good practice especially if I have thousands of devices. 我可以让每个设备都订阅类似/<DEVICE_ID>
的主题,但是这似乎不是一个好习惯,尤其是当我有成千上万个设备时。
Plus, AWS discourages it as stated in the AWS IoT documentation : 此外,AWS不鼓励其如AWS IoT文档中所述 :
Note 注意
We do not recommend using personally identifiable information in your topics. 我们不建议在主题中使用个人身份信息。
Is there a good way to handle this use case? 是否有处理此用例的好方法? Or is AWS IoT only useful to manage multiple devices at once? 还是AWS IoT仅可用于一次管理多个设备?
Here is the best practice for creating an MQTT topic. 这是创建MQTT主题的最佳实践。
https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices/ https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices/
Talking about your specific case 谈论你的具体情况
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.