Class ReceivingMqttMessage
- java.lang.Object
-
- io.smallrye.reactive.messaging.mqtt.ReceivingMqttMessage
-
- All Implemented Interfaces:
MqttMessage<byte[]>,Message<byte[]>
public class ReceivingMqttMessage extends Object implements MqttMessage<byte[]>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMessageId()Function<Throwable,CompletionStage<Void>>getNack()byte[]getPayload()io.netty.handler.codec.mqtt.MqttQoSgetQosLevel()StringgetTopic()booleanisDuplicate()booleanisRetain()CompletionStage<Void>nack(Throwable reason, Metadata metadata)Acknowledge negatively this message.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.microprofile.reactive.messaging.Message
ack, addMetadata, getAck, getMetadata, getMetadata, nack, unwrap, withMetadata, withMetadata, withNack, withPayload
-
Methods inherited from interface io.smallrye.reactive.messaging.mqtt.MqttMessage
withAck
-
-
-
-
Method Detail
-
getPayload
public byte[] getPayload()
- Specified by:
getPayloadin interfaceMessage<byte[]>- Returns:
- The payload for this message.
-
getMessageId
public int getMessageId()
- Specified by:
getMessageIdin interfaceMqttMessage<byte[]>
-
getQosLevel
public io.netty.handler.codec.mqtt.MqttQoS getQosLevel()
- Specified by:
getQosLevelin interfaceMqttMessage<byte[]>
-
isDuplicate
public boolean isDuplicate()
- Specified by:
isDuplicatein interfaceMqttMessage<byte[]>
-
isRetain
public boolean isRetain()
- Specified by:
isRetainin interfaceMqttMessage<byte[]>
-
getTopic
public String getTopic()
- Specified by:
getTopicin interfaceMqttMessage<byte[]>
-
nack
public CompletionStage<Void> nack(Throwable reason, Metadata metadata)
Description copied from interface:MessageAcknowledge negatively this message.nackis 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:
nackin interfaceMessage<byte[]>- Parameters:
reason- the reason of the nack, must not benullmetadata- additional nack metadata the connector may use, may benull- Returns:
- a completion stage completed when the message is negative-acknowledgement has completed. If the negative acknowledgement fails, the completion stage propagates the failure.
-
-