Is message queuing possible in mqtt?

0

in aws iot core mqtt It is linked as server -> aws iot broker -> device. on the server topic: test/topic1 payload : { "command": "go", "sendDt": "2024-01-23 00:55:04.458" } sending. When the server published the message, the device was not connected. Then, the device connects to the broker and subscribes to topic: test/topic1. Is there a way to receive the message sent from the server at this time?

已提问 4 个月前147 查看次数
1 回答
0

Hi. Depending on the details of what you're trying to achieve, you have several ways you could achieve this: persistent sessions, retained messages, or shadows.

https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-persistent-sessions https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-retain https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-retain-persist https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-retain-shadow

Persistent sessions (with QoS 1 for the outgoing message) would appeal as a good fit to what you described. However, retained messages or shadows may be more suitable, depending on factors such as message expiry requirements and account limits: https://docs.aws.amazon.com/general/latest/gr/iot-core.html#message-broker-limits

profile pictureAWS
专家
Greg_B
已回答 4 个月前
profile pictureAWS
专家
已审核 4 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则