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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南