Class ReceiveSqsMessageHelper
java.lang.Object
software.amazon.awssdk.services.sqs.internal.batchmanager.ReceiveSqsMessageHelper
The
ReceiveSqsMessageHelper
class forms a ReceiveMessageRequest
request based on configuration settings,
collects messages from an AWS SQS queue, and handles exceptions during the process.
It manages message visibility timeout by tracking the visibility deadline and expiring messages if not processed in time, ensuring unhandled messages return to the queue for reprocessing.
Additionally, the class supports clearing messages in the batch and changing their visibility as needed.
-
Constructor Summary
ConstructorsConstructorDescriptionReceiveSqsMessageHelper
(String queueUrl, SqsAsyncClient asyncClient, Duration visibilityTimeout, ResponseBatchConfiguration config) -
Method Summary
-
Constructor Details
-
ReceiveSqsMessageHelper
public ReceiveSqsMessageHelper(String queueUrl, SqsAsyncClient asyncClient, Duration visibilityTimeout, ResponseBatchConfiguration config)
-
-
Method Details
-
asyncReceiveMessage
-
isEmpty
public boolean isEmpty() -
getException
-
removeMessage
-
clear
public void clear() -
messagesSize
messages.size() is expensive since it is ConcurrentLinkedQueue. Thus, its used only for testing the results and not used in any internal classes.
-