Class IncomingRabbitMQMessage<T>

  • Type Parameters:
    T - the message body type
    All Implemented Interfaces:
    ContextAwareMessage<T>, org.eclipse.microprofile.reactive.messaging.Message<T>

    public class IncomingRabbitMQMessage<T>
    extends Object
    implements ContextAwareMessage<T>
    An implementation of Message suitable for incoming RabbitMQ messages.
    • Field Detail

      • message

        protected final io.vertx.rabbitmq.RabbitMQMessage message
      • metadata

        protected org.eclipse.microprofile.reactive.messaging.Metadata metadata
    • Method Detail

      • getAck

        public Supplier<CompletionStage<Void>> getAck()
        Specified by:
        getAck in interface org.eclipse.microprofile.reactive.messaging.Message<T>
      • ack

        public CompletionStage<Void> ack()
        Specified by:
        ack in interface org.eclipse.microprofile.reactive.messaging.Message<T>
      • nack

        public CompletionStage<Void> nack​(Throwable reason,
                                          org.eclipse.microprofile.reactive.messaging.Metadata metadata)
        Specified by:
        nack in interface org.eclipse.microprofile.reactive.messaging.Message<T>
      • acknowledgeMessage

        public void acknowledgeMessage()
        Acknowledges the message.
      • rejectMessage

        public void rejectMessage​(Throwable reason)
        Rejects the message by nack'ing with requeue=false; this will either discard the message for good or (if a DLQ has been set up) send it to the DLQ.
        Parameters:
        reason - the cause of the rejection, which must not be null
      • getPayload

        public T getPayload()
        Specified by:
        getPayload in interface org.eclipse.microprofile.reactive.messaging.Message<T>
      • getMetadata

        public org.eclipse.microprofile.reactive.messaging.Metadata getMetadata()
        Specified by:
        getMetadata in interface org.eclipse.microprofile.reactive.messaging.Message<T>
      • getRabbitMQMessage

        public io.vertx.mutiny.rabbitmq.RabbitMQMessage getRabbitMQMessage()
      • injectTracingMetadata

        public void injectTracingMetadata​(io.smallrye.reactive.messaging.TracingMetadata tracingMetadata)