- Mais recentes
- Mais votos
- Mais comentários
Please see here: https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-persistent-sessions
Persistent sessions store a client’s subscriptions and messages, with a quality of service (QoS) of 1, that have not been acknowledged by the client. When a disconnected device reconnects to a persistent session, the session resumes, its subscriptions are reinstated, and subscribed messages received prior to the reconnection and that have not been acknowledged by the client are sent to the client.
And: https://docs.aws.amazon.com/iot/latest/developerguide/sdk-tutorials.html
The message broker receives messages from devices and publishes messages to devices that have subscribed to them. With persistent sessions —sessions that remain active even when the initiating device is disconnected—devices can retrieve messages that were published while they were disconnected. On the device side, MQTT supports Quality of Service levels (QoS) that ensure the host receives messages sent by the device.
Is the client ID of the connection related to its state?
Yes, the Client ID is used to identify which session to resume.
Conteúdo relevante
- AWS OFICIALAtualizada há 3 anos
- AWS OFICIALAtualizada há um ano
- AWS OFICIALAtualizada há 10 meses
- AWS OFICIALAtualizada há 7 meses
Thanks for the response. I think the source of my problem was that I had created multiple clients with the same Client ID and that was causing issues. Once I gave each client a unique ID things worked as expected.