配置调整

This commit is contained in:
pengjie 2025-08-07 11:34:56 +08:00
parent ecaaf0cdc2
commit 4ef2006812

View File

@ -98,7 +98,7 @@ public class MqttConfig {
options.setConnectionTimeout(20);
// 设置会话心跳时间 单位为秒 服务器会每隔1.5*20秒的时间向客户端发送心跳判断客户端是否在线但这个方法并没有重连的机制
options.setKeepAliveInterval(20);
options.setMaxInflight(100);
options.setMaxInflight(1000);
// 设置遗嘱消息的话题若客户端与服务器之间的连接意外中断服务器将发布客户端的遗嘱消息
//options.setWill("willTopic", WILL_DATA, 2, false);
return options;