Skip to content

Renaming batch-utilities to batch-manager in docs and updating code snippets. #2639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,16 @@ For each service that can leverage batch features, two classes will be created:
public interface SqsBatchManager {

/**
* Buffers a variable number of messages on the client and sends them
* as batch requests to the service.
* Buffers outgoing requests on the client and sends them as batch requests to the service.
* Requests are batched together according to a batchKey and are sent periodically to the
* service as determined by {@link #maxBatchOpenInMs}. If the number of requests for a
* batchKey reaches or exceeds {@link #maxBatchItems}, then the requests are immediately
* flushed and the timeout on the periodic flush is reset.
* By default, messages are batched according to a service's maximum size for a batch request.
* These settings can be customized via the configuration.
*
* If the number of messages passed in is greater than the maximum size of
* a batch request, the method also automatically chunks the messages into
* the appropriate batch sizes before sending them with batch requests.
* By default, messages are chunked according to a service's maximum size for a
* batch request. These settings can be customized via the configuration.
*
* @param messages A variable number of SendMessageRequest items that represent
the messages to be passed to SQS.
* @return {@link BatchResponses}
* @param request the outgoing request.
* @return a CompletableFuture of the corresponding response.
*/
CompletableFuture<SendMessageResponse> sendMessage(SendMessageRequest message);

Expand All @@ -126,7 +124,6 @@ For each service that can leverage batch features, two classes will be created:
*/
CompletableFuture<Void> flush();


// Other Batch Manager methods omitted
// ...

Expand Down Expand Up @@ -170,35 +167,27 @@ For each service that can leverage batch features, two classes will be created:
public interface SqsAsyncBatchManager {

/**
* Buffers a variable number of messages on the client and sends them
* as batch requests to the service.
* Buffers outgoing requests on the client and sends them as batch requests to the service.
* Requests are batched together according to a batchKey and are sent periodically to the
* service as determined by {@link #maxBatchOpenInMs}. If the number of requests for a
* batchKey reaches or exceeds {@link #maxBatchItems}, then the requests are immediately
* flushed and the timeout on the periodic flush is reset.
* By default, messages are batched according to a service's maximum size for a batch request.
* These settings can be customized via the configuration.
*
* If the number of messages passed in is greater than the maximum size of
* a batch request, the method also automatically chunks the messages into
* the appropriate batch sizes before sending them with batch requests.
* By default, messages are chunked according to a service's maximum size for a
* batch request. These settings can be customized via the configuration.
*
* @param messages A variable number of SendMessageRequest items that represent
the messages to be passed to SQS.
* @return {@link BatchResponses}
* @param request the outgoing request.
* @return a CompletableFuture of the corresponding response.
*/
CompletableFuture<SendMessageResponse> sendMessage(SendMessageRequest messages);
CompletableFuture<SendMessageResponse> sendMessage(SendMessageRequest message);

/**
* Manually flush the buffer for sendMessage requests. Completes when requests
* are sent. An exception is returned otherwise.
*/
CompletableFuture<Void> flush();

/**
* Option to flush a specific buffer/queue
* Buffer: DeleteMessage buffer, sendMessage buffer, ...
* Queue: User would provide queueUrl
* Note: The option to flush a specific buffer is not implemented in v1 nor
* has it been requested.
*/
CompletableFuture<Void> flush(String bufferOrQueueName);
// Other Batch Manager methods omitted
// ...

interface Builder {

Expand Down