All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.sqs.AmazonSQSRequester Maven / Gradle / Ivy

Go to download

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();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy