Interface SqsReceiveOptions


public interface SqsReceiveOptions
Options for receiving messages from SQS queues, with a method chaining API.
  • Method Details

    • queue

      SqsReceiveOptions queue(String queue)
      Set the queue name, url or ARN from which to receive messages from.
      Parameters:
      queue - the queue name.
      Returns:
      the options instance.
    • pollTimeout

      SqsReceiveOptions pollTimeout(Duration pollTimeout)
      Set the maximum amount of time to wait for messages in the queue before returning with less than maximum of messages or empty.
      Parameters:
      pollTimeout - the amount of time.
      Returns:
      the options instance.
    • visibilityTimeout

      SqsReceiveOptions visibilityTimeout(Duration visibilityTimeout)
      Set the visibility timeout to be applied by received messages.
      Parameters:
      visibilityTimeout - the timeout.
      Returns:
      the options instance.
    • additionalHeader

      SqsReceiveOptions additionalHeader(String name, Object value)
      Provide a header name and value to be added to returned messages.
      Parameters:
      name - the header name.
      value - the header value.
      Returns:
      the options instance.
    • additionalHeaders

      SqsReceiveOptions additionalHeaders(Map<String,Object> headers)
      Provide headers to be added to returned messages.
      Parameters:
      headers - the headers to add.
      Returns:
      the options instance.
    • maxNumberOfMessages

      SqsReceiveOptions maxNumberOfMessages(Integer maxNumberOfMessages)
      Set the maximum number of messages to be returned.
      Parameters:
      maxNumberOfMessages - the number of messages.
      Returns:
      the options instance.
    • receiveRequestAttemptId

      SqsReceiveOptions receiveRequestAttemptId(UUID receiveRequestAttemptId)
      Set the receiveRequestAttemptId required attribute. If none is provided for a FIFO queue a random one is generated.
      Parameters:
      receiveRequestAttemptId - the id.
      Returns:
      the options instance.