1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
0
When connecting the client, set the cleanSession
flag to false
to resume an existing session if one exists.
Set the sessionExpiryInterval
to a non-zero value to persist the session for a duration even after disconnection.
On reconnecting, subscriptions, pending messages and QoS 1 messages will be reinstated from the previous session.
You can test this by publishing messages while the client is disconnected. On reconnecting, these messages should be received by the client.
Make sure the client ID remains the same across connections for the broker to identify and resume the correct session.
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 2 Jahren