Skip to content

Commit 874a571

Browse files
committed
feat: add scheduled executor to SqsAsyncBatchManager for improved batch processing
1 parent 4728090 commit 874a571

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/sqs/SqsAutoConfiguration.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
import software.amazon.awssdk.services.sqs.batchmanager.SqsAsyncBatchManager;
5353
import software.amazon.awssdk.services.sqs.model.Message;
5454

55+
import java.util.concurrent.Executors;
56+
5557
/**
5658
* {@link EnableAutoConfiguration Auto-configuration} for SQS integration.
5759
*
@@ -98,6 +100,7 @@ public SqsAsyncClient batchSqsAsyncClient(SqsAsyncClient sqsAsyncClient) {
98100
private SqsAsyncBatchManager createBatchManager(SqsAsyncClient sqsAsyncClient) {
99101
return SqsAsyncBatchManager.builder()
100102
.client(sqsAsyncClient)
103+
.scheduledExecutor(Executors.newScheduledThreadPool(5))
101104
.overrideConfiguration(this::configurationProperties)
102105
.build();
103106
}

0 commit comments

Comments
 (0)