com.amazonaws.services.sqs.AmazonSQSRequester Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of amazon-sqs-java-temporary-queues-client Show documentation
Show all versions of amazon-sqs-java-temporary-queues-client Show documentation
An Amazon SQS client that supports creating lightweight, automatically-deleted temporary queues, for use in common messaging patterns such as Request/Response. See http://aws.amazon.com/sqs.
The newest version!
package com.amazonaws.services.sqs;
import software.amazon.awssdk.services.sqs.SqsClient;
import software.amazon.awssdk.services.sqs.model.Message;
import software.amazon.awssdk.services.sqs.model.SendMessageRequest;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
public interface AmazonSQSRequester {
SqsClient getAmazonSQS();
/**
* Sends a message and waits the given amount of time for
* the response message.
*/
public Message sendMessageAndGetResponse(SendMessageRequest request,
int timeout, TimeUnit unit) throws TimeoutException;
/**
* Sends a message and returns a CompletableFuture
* that will be completed with the response message when it arrives.
*/
public CompletableFuture sendMessageAndGetResponseAsync(SendMessageRequest request,
int timeout, TimeUnit unit);
public void shutdown();
}