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?

preguntada hace 4 meses147 visualizaciones
1 Respuesta
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
EXPERTO
Greg_B
respondido hace 4 meses
profile pictureAWS
EXPERTO
revisado hace 4 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas