AWS-IOT Mqtt Broker是否会记住客户端连接中已订阅的客户端和未交付的消息? [英] Does AWS-IOT Mqtt Broker remember subscribed clients and undelivered messages across client Connections?

查看:212
本文介绍了AWS-IOT Mqtt Broker是否会记住客户端连接中已订阅的客户端和未交付的消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处提供AWS文档([ http://docs.aws.amazon.com/iot/latest/developerguide/iot-message-broker.html] )说:-

AWS Documentation here ( [http://docs.aws.amazon.com/iot/latest/developerguide/iot-message-broker.html] ) says this :-

"消息代理维护所有客户端会话和每个会话的订阅的列表.当在主题上发布消息时,代理检查是否存在带有映射到该主题的订阅的会话.然后转发将消息发布到具有当前连接的客户端的所有会话.对于所有没有连接客户端的匹配会话,代理将保存消息以在客户端连接时进行传递."

"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. For all matching sessions that do not have a connected client, the broker saves the message for delivery when the clients connect."

但是,这里([ http://docs.aws. amazon.com/iot/latest/developerguide/protocols.html] )说:-

However, here ( [http://docs.aws.amazon.com/iot/latest/developerguide/protocols.html] ) it says this :-

消息代理不支持持久会话(干净会话设置为0).所有会话均假定为干净会话,消息未跨会话存储.如果是MQTT客户端发送带有clean session属性设置为false的消息,客户端将被断开连接."

"The message broker does not supports persistent sessions (clean session set to 0). All sessions are assumed to be clean sessions and messages are not stored across sessions. If an MQTT client sends a message with the clean session attribute set to false, the client will be disconnected."

这是一个矛盾.有人可以详细说明一下吗? 谢谢.

This is a contradiction. Can Someone please elaborate and clarify. Thanks.

推荐答案

AWS IoT现在支持应满足您要求的持久连接.您可以在

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 Mqtt Broker是否会记住客户端连接中已订阅的客户端和未交付的消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆