- 最新
- 投票最多
- 评论最多
【以下的回答经过翻译处理】 请参见此处: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.
同时请参见: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.
客户端ID与其状态有关吗?
是的,客户端ID用于标识要恢复哪个会话。
相关内容
- AWS 官方已更新 2 年前