Package io.awspring.cloud.sqs.operations
Interface SqsAsyncOperations
- All Superinterfaces:
AsyncMessagingOperations
- All Known Implementing Classes:
SqsTemplate
Sqs-specific asynchronous messaging operations for Standard and Fifo queues.
- Since:
- 3.0
- Author:
- Tomaz Fernandes
-
Method Summary
Modifier and TypeMethodDescriptionReceive a message using theSqsReceiveOptions
options.<T> CompletableFuture<Optional<Message<T>>>
receiveAsync
(Consumer<SqsReceiveOptions> from, Class<T> payloadClass) Receive a message using theSqsReceiveOptions
options and convert the payload to the provided class.Receive a batch of messages using theSqsReceiveOptions
options.<T> CompletableFuture<Collection<Message<T>>>
receiveManyAsync
(Consumer<SqsReceiveOptions> from, Class<T> payloadClass) Receive a batch of messages using theSqsReceiveOptions
options and convert the payloads to the provided class.<T> CompletableFuture<SendResult<T>>
sendAsync
(Consumer<SqsSendOptions<T>> to) Send a message usingSqsSendOptions
.Methods inherited from interface io.awspring.cloud.sqs.operations.AsyncMessagingOperations
receiveAsync, receiveAsync, receiveManyAsync, receiveManyAsync, sendAsync, sendAsync, sendAsync, sendManyAsync
-
Method Details
-
sendAsync
Send a message usingSqsSendOptions
.- Parameters:
to
- aSqsSendOptions
consumer.- Returns:
- a
CompletableFuture
to be completed with theUUID
of the message.
-
receiveAsync
Receive a message using theSqsReceiveOptions
options.- Parameters:
from
- aSqsReceiveOptions
consumer.- Returns:
- a
CompletableFuture
to be completed with the message, orOptional.empty()
if none is returned.
-
receiveAsync
<T> CompletableFuture<Optional<Message<T>>> receiveAsync(Consumer<SqsReceiveOptions> from, Class<T> payloadClass) Receive a message using theSqsReceiveOptions
options and convert the payload to the provided class.- Parameters:
from
- aSqsReceiveOptions
consumer.- Returns:
- a
CompletableFuture
to be completed with the message, orOptional.empty()
if none is returned.
-
receiveManyAsync
Receive a batch of messages using theSqsReceiveOptions
options.- Parameters:
from
- aSqsReceiveOptions
consumer.- Returns:
- a
CompletableFuture
to be completed with the messages, or an empty collection if none is returned.
-
receiveManyAsync
<T> CompletableFuture<Collection<Message<T>>> receiveManyAsync(Consumer<SqsReceiveOptions> from, Class<T> payloadClass) Receive a batch of messages using theSqsReceiveOptions
options and convert the payloads to the provided class.- Parameters:
from
- aSqsReceiveOptions
consumer.- Returns:
- a
CompletableFuture
to be completed with the messages, or an empty collection if none is returned.
-