Class OutgoingAmqpMessage<T>
- java.lang.Object
-
- io.smallrye.reactive.messaging.amqp.AmqpMessage<T>
-
- io.smallrye.reactive.messaging.amqp.OutgoingAmqpMessage<T>
-
- All Implemented Interfaces:
Message<T>
public class OutgoingAmqpMessage<T> extends AmqpMessage<T> implements Message<T>
-
-
Field Summary
-
Fields inherited from class io.smallrye.reactive.messaging.amqp.AmqpMessage
APPLICATION_JSON, message, onNack
-
-
Constructor Summary
Constructors Constructor Description OutgoingAmqpMessage(io.vertx.mutiny.amqp.AmqpMessage message, OutgoingAmqpMetadata amqpMetadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<Void>ack()Acknowledge this message.Supplier<CompletionStage<Void>>getAck()StringgetAddress()io.vertx.core.json.JsonObjectgetApplicationProperties()StringgetContentEncoding()StringgetContentType()ObjectgetCorrelationId()StringgetGroupId()ObjectgetMessageId()MetadatagetMetadata()Function<Throwable,CompletionStage<Void>>getNack()intgetPriority()StringgetSubject()longgetTtl()booleanisDurable()CompletionStage<Void>nack(Throwable reason, Metadata metadata)Acknowledge negatively this message.-
Methods inherited from class io.smallrye.reactive.messaging.amqp.AmqpMessage
builder, getAmqpMessage, getBody, getCreationTime, getDeliveryCount, getError, getExpiryTime, getGroupSequence, getPayload, injectTracingMetadata, 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, getMetadata, getPayload, nack, unwrap, withAck, withMetadata, withMetadata, withNack, withPayload
-
-
-
-
Constructor Detail
-
OutgoingAmqpMessage
public OutgoingAmqpMessage(io.vertx.mutiny.amqp.AmqpMessage message, OutgoingAmqpMetadata amqpMetadata)
-
-
Method Detail
-
getMetadata
public Metadata getMetadata()
- Specified by:
getMetadatain interfaceMessage<T>- Overrides:
getMetadatain classAmqpMessage<T>- Returns:
- The set of metadata attached to this message, potentially empty.
-
isDurable
public boolean isDurable()
- Overrides:
isDurablein classAmqpMessage<T>
-
getPriority
public int getPriority()
- Overrides:
getPriorityin classAmqpMessage<T>
-
getTtl
public long getTtl()
- Overrides:
getTtlin classAmqpMessage<T>
-
getMessageId
public Object getMessageId()
- Overrides:
getMessageIdin classAmqpMessage<T>
-
getAddress
public String getAddress()
- Overrides:
getAddressin classAmqpMessage<T>
-
getGroupId
public String getGroupId()
- Overrides:
getGroupIdin classAmqpMessage<T>
-
getContentType
public String getContentType()
- Overrides:
getContentTypein classAmqpMessage<T>
-
getCorrelationId
public Object getCorrelationId()
- Overrides:
getCorrelationIdin classAmqpMessage<T>
-
getContentEncoding
public String getContentEncoding()
- Overrides:
getContentEncodingin classAmqpMessage<T>
-
getSubject
public String getSubject()
- Overrides:
getSubjectin classAmqpMessage<T>
-
ack
public CompletionStage<Void> ack()
Description copied from interface:MessageAcknowledge this message.
-
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<T>- Overrides:
nackin classAmqpMessage<T>- 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.
-
getAck
public Supplier<CompletionStage<Void>> getAck()
- Specified by:
getAckin interfaceMessage<T>- Overrides:
getAckin classAmqpMessage<T>- Returns:
- the supplier used to retrieve the acknowledgement
CompletionStage.
-
getNack
public Function<Throwable,CompletionStage<Void>> getNack()
-
getApplicationProperties
public io.vertx.core.json.JsonObject getApplicationProperties()
- Overrides:
getApplicationPropertiesin classAmqpMessage<T>
-
-