com.feingto.iot.common.model.mqtt.MqttConnectOptions Maven / Gradle / Ivy
package com.feingto.iot.common.model.mqtt;
import lombok.Data;
import java.io.Serializable;
/**
* MQTT 连接配置
*
* @author longfei
*/
@Data
public class MqttConnectOptions implements Serializable {
private static final long serialVersionUID = -8319980161492137190L;
private String host = "localhost";
/**
* 连接TCP端口
*/
private int port = 6090;
/**
* 连接WebSocket端口
*/
private int wsPort;
/**
* 订阅主题
*/
private String[] topic;
/**
* 连接设备ID
*/
private String clientId;
/**
* 连接用户名
*/
private String username;
/**
* 连接密码
*/
private String password;
/**
* 清除会话
*/
private boolean cleanSession = false;
/**
* 连接超时时间, 单位秒
*/
private int timeout = 30;
/**
* 重试间隔时间, 单位秒
*/
private int retryInterval = 10;
/**
* 最大重试次数
*/
private int retryMaxAttempts = 10;
/**
* 心跳频率, 单位秒
*/
private int keepAliveInterval = 60;
/**
* 遗言标志
*/
private boolean willFlag = false;
/**
* 遗言推送主题
*/
private String willTopic;
/**
* 遗言是否保留
*/
private boolean willRetain;
/**
* 遗言Qos Level
*/
private int willQos;
/**
* 遗言消息
*/
private String willMessage = "";
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy