Package io.awspring.cloud.sqs.operations
Interface SqsReceiveOptions
public interface SqsReceiveOptions
Options for receiving messages from SQS queues, with a method chaining API.
-
Method Summary
Modifier and TypeMethodDescriptionadditionalHeader
(String name, Object value) Provide a header name and value to be added to returned messages.additionalHeaders
(Map<String, Object> headers) Provide headers to be added to returned messages.maxNumberOfMessages
(Integer maxNumberOfMessages) Set the maximum number of messages to be returned.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.Set the queue name, url or ARN from which to receive messages from.receiveRequestAttemptId
(UUID receiveRequestAttemptId) Set the receiveRequestAttemptId required attribute.visibilityTimeout
(Duration visibilityTimeout) Set the visibility timeout to be applied by received messages.
-
Method Details
-
queue
Set the queue name, url or ARN from which to receive messages from.- Parameters:
queue
- the queue name.- Returns:
- the options instance.
-
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
Set the visibility timeout to be applied by received messages.- Parameters:
visibilityTimeout
- the timeout.- Returns:
- the options instance.
-
additionalHeader
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
Provide headers to be added to returned messages.- Parameters:
headers
- the headers to add.- Returns:
- the options instance.
-
maxNumberOfMessages
Set the maximum number of messages to be returned.- Parameters:
maxNumberOfMessages
- the number of messages.- Returns:
- the options instance.
-
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.
-