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,
                                          Metadata metadata)
        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. Additional metadata may be provided that the connector can use when nacking the message. The interpretation of metadata is connector-specific.
        Specified by:
        nack in interface Message<byte[]>
        Parameters:
        reason - the reason of the nack, must not be null
        metadata - additional nack metadata the connector may use, may 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.