All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.feingto.iot.common.model.mqtt.SubscribeMessage Maven / Gradle / Ivy

There is a newer version: 2.3.3.RELEASE
Show newest version
package com.feingto.iot.common.model.mqtt;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * MQTT 订阅消息封装
 *
 * @author longfei
 */
@Data
@Accessors(fluent = true)
public class SubscribeMessage implements Serializable {
    private static final long serialVersionUID = -379518677104044700L;

    private String clientId;

    /**
     * 主题名称
     */
    private String topicName;

    /**
     * QoS level
     * 0: 发布到所有订阅者,不响应
     * 1: 持久化,发布到所有订阅者,返回PUBACK
     * 2: 持久化,不发布,返回PUBREC,需要彼此确认
     * 在QoS level = 2时,通信双方都需要知道各自的确认流程以及所处阶段等,交互很多,数据量大的情况下,可能会造成数据线路传递拥塞。
     */
    private int mqttQoS;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy