MqttConnectionProperties.java 799 Bytes
package vc.thinker.absctacts.mqtt.connection;

import lombok.Data;

/**
 * Mqtt连接基础信息
 *
 * @author xfy
 * @since 2021/6/21 18:11
 **/
@Data
public class MqttConnectionProperties {
    /**
     * broker地址
     */
    private String broker;

    /**
     * 客户端id
     */
    private String clientId;
    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 清除session
     */
    private boolean cleanSession;

    /**
     * 重连初始时间,秒
     */
    private int reconnectionInterval = 3;

    /**
     * 重连时间最大值
     */
    private final int reconnectionIntervalMax = 30;

    /**
     * 重连时间递增
     */
    private final int reconnectionIncreasing = 0;
}