Class AmqpMessage<T>
- java.lang.Object
-
- io.smallrye.reactive.messaging.amqp.AmqpMessage<T>
-
- All Implemented Interfaces:
Message<T>
- Direct Known Subclasses:
OutgoingAmqpMessage
public class AmqpMessage<T> extends Object implements Message<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected IncomingAmqpMetadata
amqpMetadata
protected static String
APPLICATION_JSON
protected io.vertx.amqp.AmqpMessage
message
protected Metadata
metadata
protected AmqpFailureHandler
onNack
-
Constructor Summary
Constructors Constructor Description AmqpMessage(io.vertx.amqp.AmqpMessage msg, io.vertx.mutiny.core.Context context, AmqpFailureHandler onNack)
AmqpMessage(io.vertx.mutiny.amqp.AmqpMessage delegate, io.vertx.mutiny.core.Context context, AmqpFailureHandler onNack)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<Void>
ack()
Acknowledge this message.static <T> AmqpMessageBuilder<T>
builder()
String
getAddress()
io.vertx.mutiny.amqp.AmqpMessage
getAmqpMessage()
io.vertx.core.json.JsonObject
getApplicationProperties()
org.apache.qpid.proton.amqp.messaging.Section
getBody()
String
getContentEncoding()
String
getContentType()
Object
getCorrelationId()
long
getCreationTime()
long
getDeliveryCount()
org.apache.qpid.proton.message.MessageError
getError()
long
getExpiryTime()
String
getGroupId()
long
getGroupSequence()
org.apache.qpid.proton.amqp.messaging.Header
getHeader()
Object
getMessageId()
Metadata
getMetadata()
T
getPayload()
int
getPriority()
String
getSubject()
long
getTtl()
boolean
isDurable()
CompletionStage<Void>
nack(Throwable reason)
Acknowledge negatively this message.org.apache.qpid.proton.message.Message
unwrap()
-
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
addMetadata, getAck, getMetadata, getNack, unwrap, withAck, withMetadata, withMetadata, withNack, withPayload
-
-
-
-
Field Detail
-
APPLICATION_JSON
protected static final String APPLICATION_JSON
- See Also:
- Constant Field Values
-
message
protected final io.vertx.amqp.AmqpMessage message
-
metadata
protected final Metadata metadata
-
amqpMetadata
protected final IncomingAmqpMetadata amqpMetadata
-
onNack
protected final AmqpFailureHandler onNack
-
-
Constructor Detail
-
AmqpMessage
public AmqpMessage(io.vertx.mutiny.amqp.AmqpMessage delegate, io.vertx.mutiny.core.Context context, AmqpFailureHandler onNack)
-
AmqpMessage
public AmqpMessage(io.vertx.amqp.AmqpMessage msg, io.vertx.mutiny.core.Context context, AmqpFailureHandler onNack)
-
-
Method Detail
-
builder
public static <T> AmqpMessageBuilder<T> builder()
-
ack
public CompletionStage<Void> ack()
Description copied from interface:Message
Acknowledge this message.
-
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.
-
getPayload
public T getPayload()
- Specified by:
getPayload
in interfaceMessage<T>
- Returns:
- The payload for this message.
-
getMetadata
public Metadata getMetadata()
- Specified by:
getMetadata
in interfaceMessage<T>
- Returns:
- The set of metadata attached to this message, potentially empty.
-
unwrap
public org.apache.qpid.proton.message.Message unwrap()
-
isDurable
public boolean isDurable()
-
getDeliveryCount
public long getDeliveryCount()
-
getPriority
public int getPriority()
-
getTtl
public long getTtl()
-
getMessageId
public Object getMessageId()
-
getGroupSequence
public long getGroupSequence()
-
getCreationTime
public long getCreationTime()
-
getAddress
public String getAddress()
-
getGroupId
public String getGroupId()
-
getContentType
public String getContentType()
-
getExpiryTime
public long getExpiryTime()
-
getCorrelationId
public Object getCorrelationId()
-
getContentEncoding
public String getContentEncoding()
-
getSubject
public String getSubject()
-
getHeader
public org.apache.qpid.proton.amqp.messaging.Header getHeader()
-
getApplicationProperties
public io.vertx.core.json.JsonObject getApplicationProperties()
-
getBody
public org.apache.qpid.proton.amqp.messaging.Section getBody()
-
getError
public org.apache.qpid.proton.message.MessageError getError()
-
getAmqpMessage
public io.vertx.mutiny.amqp.AmqpMessage getAmqpMessage()
-
-