public class ReceivingMqttMessage extends Object implements MqttMessage<byte[]>
Modifier and Type | Method and Description |
---|---|
int |
getMessageId() |
Function<Throwable,CompletionStage<Void>> |
getNack() |
byte[] |
getPayload() |
io.netty.handler.codec.mqtt.MqttQoS |
getQosLevel() |
String |
getTopic() |
boolean |
isDuplicate() |
boolean |
isRetain() |
CompletionStage<Void> |
nack(Throwable reason,
Metadata metadata)
Acknowledge negatively this message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
of, of, of, of, of, withAck
ack, addMetadata, getAck, getMetadata, getMetadata, nack, of, of, of, unwrap, withMetadata, withMetadata, withNack, withPayload
public byte[] getPayload()
getPayload
in interface Message<byte[]>
public int getMessageId()
getMessageId
in interface MqttMessage<byte[]>
public io.netty.handler.codec.mqtt.MqttQoS getQosLevel()
getQosLevel
in interface MqttMessage<byte[]>
public boolean isDuplicate()
isDuplicate
in interface MqttMessage<byte[]>
public boolean isRetain()
isRetain
in interface MqttMessage<byte[]>
public String getTopic()
getTopic
in interface MqttMessage<byte[]>
public CompletionStage<Void> nack(Throwable reason, Metadata metadata)
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.nack
in interface Message<byte[]>
reason
- the reason of the nack, must not be null
metadata
- additional nack metadata the connector may use, may be null
Copyright © 2018–2021 SmallRye. All rights reserved.