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?

asked 3 months ago137 views
1 Answer
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
EXPERT
Greg_B
answered 3 months ago
profile pictureAWS
EXPERT
reviewed 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions