Interface AmqpClient.ReceiveSpec

Enclosing interface:
AmqpClient

public static interface AmqpClient.ReceiveSpec
The fluent API for the receiving operation based on the from address.
Since:
4.1
Author:
Artem Bilan
  • Method Details

    • timeout

      AmqpClient.ReceiveSpec timeout(Duration timeout)
      Set a timeout for the delivery. The maximum is limited by the AmqpClient.Builder.completionTimeout(Duration) which is 1 minute by default.
      Parameters:
      timeout - to wait for the delivery.
      Returns:
      a CompletableFuture with the message.
    • receive

      default CompletableFuture<Message> receive()
      Receive a Spring AMQP message from the provided from address.
      Returns:
      a CompletableFuture with the message.
    • receiveProtonMessage

      CompletableFuture<org.apache.qpid.protonj2.client.Message<?>> receiveProtonMessage()
      Receive a native ProtonJ message from the provided from address.
      Returns:
      a CompletableFuture with the message.
    • receiveAndConvert

      <T> CompletableFuture<T> receiveAndConvert(T... reified)
      Receive a message from the provided from address and convert its body to the provided generic type.
      Type Parameters:
      T - the type to convert the message body into.
      Parameters:
      reified - the argument which is used to extract a generic type for conversion. Must not be set!
      Returns:
      a CompletableFuture with payload of the expected type converted from the message body.