Class ReceivingMqttMessage

    • Method Detail

      • getPayload

        public byte[] getPayload()
        Specified by:
        getPayload in interface Message<byte[]>
        Returns:
        The payload for this message.
      • getQosLevel

        public io.netty.handler.codec.mqtt.MqttQoS getQosLevel()
        Specified by:
        getQosLevel in interface MqttMessage<byte[]>
      • isRetain

        public boolean isRetain()
        Specified by:
        isRetain in interface MqttMessage<byte[]>
      • nack

        public CompletionStage<Void> nack​(Throwable reason)
        Description copied from interface: Message
        Acknowledge negatively this message. nack is used to indicate that the processing of a message failed. The reason is passed as parameter.
        Specified by:
        nack in interface Message<byte[]>
        Parameters:
        reason - the reason of the nack, must not be null
        Returns:
        a completion stage completed when the message is negative-acknowledgement has completed. If the negative acknowledgement fails, the completion stage propagates the failure.