@@ -41,6 +41,8 @@ public class SqsProperties extends AwsClientProperties {
41
41
42
42
private Listener listener = new Listener ();
43
43
44
+ private Batch batch = new Batch ();
45
+
44
46
public Listener getListener () {
45
47
return this .listener ;
46
48
}
@@ -49,6 +51,14 @@ public void setListener(Listener listener) {
49
51
this .listener = listener ;
50
52
}
51
53
54
+ public Batch getBatch () {
55
+ return batch ;
56
+ }
57
+
58
+ public void setBatch (Batch batch ) {
59
+ this .batch = batch ;
60
+ }
61
+
52
62
@ Nullable
53
63
private QueueNotFoundStrategy queueNotFoundStrategy ;
54
64
@@ -147,40 +157,61 @@ public void setMaxDelayBetweenPolls(Duration maxDelayBetweenPolls) {
147
157
148
158
public static class Batch {
149
159
160
+ /**
161
+ * Enables SQS automatic batching using AWS SDK's SqsAsyncBatchManager.
162
+ */
163
+ private boolean enabled = false ;
164
+
150
165
/**
151
166
* The maximum number of messages that can be processed in a single batch. The
152
167
* maximum is 10.
153
168
*/
169
+ @ Nullable
154
170
private Integer maxNumberOfMessages ;
155
171
156
172
/**
157
173
* The frequency at which requests are sent to SQS when processing messages in a
158
174
* batch.
159
175
*/
176
+ @ Nullable
160
177
private Duration sendBatchFrequency ;
161
178
162
179
/**
163
180
* The visibility timeout to set for messages received in a batch. If unset, the
164
181
* queue default is used.
165
182
*/
183
+ @ Nullable
166
184
private Duration visibilityTimeout ;
167
185
168
186
/**
169
187
* The minimum wait duration for a receiveMessage request in a batch. To avoid
170
188
* unnecessary CPU usage, do not set this value to 0.
171
189
*/
190
+ @ Nullable
172
191
private Duration waitTimeSeconds ;
173
192
174
193
/**
175
194
* The list of system attribute names to request for receiveMessage calls.
176
195
*/
196
+ @ Nullable
177
197
private List <MessageSystemAttributeName > systemAttributeNames ;
178
198
179
199
/**
180
200
* The list of attribute names to request for receiveMessage calls.
181
201
*/
202
+ @ Nullable
182
203
private List <String > attributeNames ;
183
204
205
+ @ Nullable
206
+ public Boolean getEnabled () {
207
+ return enabled ;
208
+ }
209
+
210
+ public void setEnabled (Boolean enabled ) {
211
+ this .enabled = enabled ;
212
+ }
213
+
214
+ @ Nullable
184
215
public Integer getMaxNumberOfMessages () {
185
216
return maxNumberOfMessages ;
186
217
}
@@ -189,6 +220,7 @@ public void setMaxNumberOfMessages(Integer maxNumberOfMessages) {
189
220
this .maxNumberOfMessages = maxNumberOfMessages ;
190
221
}
191
222
223
+ @ Nullable
192
224
public Duration getSendBatchFrequency () {
193
225
return sendBatchFrequency ;
194
226
}
@@ -197,6 +229,7 @@ public void setSendBatchFrequency(Duration sendBatchFrequency) {
197
229
this .sendBatchFrequency = sendBatchFrequency ;
198
230
}
199
231
232
+ @ Nullable
200
233
public Duration getVisibilityTimeout () {
201
234
return visibilityTimeout ;
202
235
}
@@ -205,6 +238,7 @@ public void setVisibilityTimeout(Duration visibilityTimeout) {
205
238
this .visibilityTimeout = visibilityTimeout ;
206
239
}
207
240
241
+ @ Nullable
208
242
public Duration getWaitTimeSeconds () {
209
243
return waitTimeSeconds ;
210
244
}
@@ -213,6 +247,7 @@ public void setWaitTimeSeconds(Duration waitTimeSeconds) {
213
247
this .waitTimeSeconds = waitTimeSeconds ;
214
248
}
215
249
250
+ @ Nullable
216
251
public List <MessageSystemAttributeName > getSystemAttributeNames () {
217
252
return systemAttributeNames ;
218
253
}
@@ -221,6 +256,7 @@ public void setSystemAttributeNames(List<MessageSystemAttributeName> systemAttri
221
256
this .systemAttributeNames = systemAttributeNames ;
222
257
}
223
258
259
+ @ Nullable
224
260
public List <String > getAttributeNames () {
225
261
return attributeNames ;
226
262
}
0 commit comments