Does AWS-IOT Mqtt Broker remember subscribed clients and undelivered messages across client Connections?

青春壹個敷衍的年華 提交于 2019-12-06 00:16:24

AWS IoT now supports persistent connections which should meet your requirements. You can get more information at https://aws.amazon.com/about-aws/whats-new/2019/01/aws-iot-core-now-enables-customers-to-store-messages-for-disconnected-devices/

AWS IoT does not support persistent sessions (clean session flag = 0) so it will not remember subscribed clients or undelivered messages after a client disconnects. It presumably takes this approach to minimize storing state in the broker which allows the AWS IoT solution to scale.

As of 30 November 2018, the documentation in your first link (https://docs.aws.amazon.com/iot/latest/developerguide/iot-message-broker.html) has been updated and only states:

The message broker maintains a list of all client sessions and the subscriptions for each session. When a message is published on a topic, the broker checks for sessions with subscriptions that map to the topic. The broker then forwards the publish message to all sessions that have a currently connected client.

The first part explains message delivery to subscribed clients and the mechanism to propagate the message when clients are connected and disconnected.

Persistent sessions means all messages sent to the broker are saved to disk or database, hence independent of client connections.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!