AWS IoT 中的作业和消息有什么区别?

What is the difference between Jobs and Messages in AWS IoT?

作业和消息都只是 AWS IoT 服务和设备之间的文本交易。

为什么我应该使用作业而不是消息或其他方式?

它们是交易,但它们有区别

Messages - The AWS IoT message broker is a publish/subscribe broker service that enables the sending and receiving of messages to and from AWS IoT. The act of sending the message is referred to as publishing. The act of registering to receive messages for a topic filter is referred to as subscribing.

示例 - 与 AWS IoT 通信时,客户端发送一条消息,地址为 Sensor/temp/room1 之类的主题。消息代理依次将消息发送给所有已注册接收该主题消息的客户端。

Jobs - AWS IoT jobs can be used to define a set of remote operations that are sent to and executed on one or more devices connected to AWS IoT.

示例 - 您可以定义一个作业,指示一组设备下载和安装应用程序或固件更新、重新启动、轮换证书或执行远程故障排除操作。

根据您的要求使用职位或消息。如果你想更新一组设备,乔布斯似乎可以完成这项工作,或者它只是一个设备消息就可以了。