当使用Mosquitto v1.14作为本地网桥时,它将在缺少与云Mosquitto v1.6代理的连接时将消息排队。即使连接断开了几天,它也会在重新建立连接时将所有丢失的消息发送到云端。
当使用v1.5.8或1.6(我测试过的两个)作为本地网桥时,某些消息会丢失。重新建立连接后,大约每隔三则消息就会消失。邮件大小约为100 KB,每10分钟发送到本地代理。
使用QoS1将消息发布到本地网桥。
云VM中的客户端(也托管云Mosquitto代理)使用QoS1订阅了云代理。
本地系统是Win7 64位。
Cloud VM是Win Server 2016 64位。
这是我在本地使用的配置文件,并且与我尝试过的所有版本相同:
max_inflight_messages 1
max_queued_messages 1209600
persistence true
log_type error
log_type warning
log_type notice
log_type information
log_type all
connection_messages true
connection cloud-bridge
bridge_protocol_version mqttv311
address <cloud address>:1883
cleansession false
topic # out 1 "" ""
remote_clientid broker1
这是用于云代理的配置文件:
max_inflight_messages 1
max_queued_messages 10000000
persistence true
log_type error
log_type warning
log_type notice
log_type information
log_type all
connection_messages true
我尝试以管理员身份运行网桥和代理。
我真的很想在此项目中使用较新版本的Mosquitto。
您知道为什么更高版本的Mosquitto会丢弃消息吗?