Interface IMqttClientMessageListener

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface IMqttClientMessageListener
    mqtt 消息处理
    Author:
    L.cm
    • Method Detail

      • onSubscribed

        default void onSubscribed​(String topicFilter,
                                  br.com.anteros.mqtt.codec.MqttQoS mqttQoS)
        订阅成功之后的事件
        Parameters:
        topicFilter - topicFilter
        mqttQoS - MqttQoS
      • onMessage

        void onMessage​(String topic,
                       ByteBuffer payload)
        监听到消息
        Parameters:
        topic - topic
        payload - payload