@@ -105,18 +105,16 @@ For each service that can leverage batch features, two classes will be created:
105
105
public interface SqsBatchManager {
106
106
107
107
/**
108
- * Buffers a variable number of messages on the client and sends them
109
- * as batch requests to the service.
108
+ * Buffers outgoing requests on the client and sends them as batch requests to the service.
109
+ * Requests are batched together according to a batchKey and are sent periodically to the
110
+ * service as determined by {@link #maxBatchOpenInMs}. If the number of requests for a
111
+ * batchKey reaches or exceeds {@link #maxBatchItems}, then the requests are immediately
112
+ * flushed and the timeout on the periodic flush is reset.
113
+ * By default, messages are batched according to a service's maximum size for a batch request.
114
+ * These settings can be customized via the configuration.
110
115
*
111
- * If the number of messages passed in is greater than the maximum size of
112
- * a batch request, the method also automatically chunks the messages into
113
- * the appropriate batch sizes before sending them with batch requests.
114
- * By default, messages are chunked according to a service's maximum size for a
115
- * batch request. These settings can be customized via the configuration.
116
- *
117
- * @param messages A variable number of SendMessageRequest items that represent
118
- the messages to be passed to SQS.
119
- * @return {@link BatchResponses}
116
+ * @param request the outgoing request.
117
+ * @return a CompletableFuture of the corresponding response.
120
118
*/
121
119
CompletableFuture<SendMessageResponse> sendMessage(SendMessageRequest message);
122
120
@@ -126,7 +124,6 @@ For each service that can leverage batch features, two classes will be created:
126
124
*/
127
125
CompletableFuture<Void> flush();
128
126
129
-
130
127
// Other Batch Manager methods omitted
131
128
// ...
132
129
@@ -170,35 +167,27 @@ For each service that can leverage batch features, two classes will be created:
170
167
public interface SqsAsyncBatchManager {
171
168
172
169
/**
173
- * Buffers a variable number of messages on the client and sends them
174
- * as batch requests to the service.
170
+ * Buffers outgoing requests on the client and sends them as batch requests to the service.
171
+ * Requests are batched together according to a batchKey and are sent periodically to the
172
+ * service as determined by {@link #maxBatchOpenInMs}. If the number of requests for a
173
+ * batchKey reaches or exceeds {@link #maxBatchItems}, then the requests are immediately
174
+ * flushed and the timeout on the periodic flush is reset.
175
+ * By default, messages are batched according to a service's maximum size for a batch request.
176
+ * These settings can be customized via the configuration.
175
177
*
176
- * If the number of messages passed in is greater than the maximum size of
177
- * a batch request, the method also automatically chunks the messages into
178
- * the appropriate batch sizes before sending them with batch requests.
179
- * By default, messages are chunked according to a service's maximum size for a
180
- * batch request. These settings can be customized via the configuration.
181
- *
182
- * @param messages A variable number of SendMessageRequest items that represent
183
- the messages to be passed to SQS.
184
- * @return {@link BatchResponses}
178
+ * @param request the outgoing request.
179
+ * @return a CompletableFuture of the corresponding response.
185
180
*/
186
- CompletableFuture<SendMessageResponse> sendMessage(SendMessageRequest messages );
181
+ CompletableFuture<SendMessageResponse> sendMessage(SendMessageRequest message );
187
182
188
183
/**
189
184
* Manually flush the buffer for sendMessage requests. Completes when requests
190
185
* are sent. An exception is returned otherwise.
191
186
*/
192
187
CompletableFuture<Void> flush();
193
188
194
- /**
195
- * Option to flush a specific buffer/queue
196
- * Buffer: DeleteMessage buffer, sendMessage buffer, ...
197
- * Queue: User would provide queueUrl
198
- * Note: The option to flush a specific buffer is not implemented in v1 nor
199
- * has it been requested.
200
- */
201
- CompletableFuture<Void> flush(String bufferOrQueueName);
189
+ // Other Batch Manager methods omitted
190
+ // ...
202
191
203
192
interface Builder {
204
193
0 commit comments