AWS SQS org.springframework.core.task.TaskRejectedException Error: Copy to Clipboardorg.springframework.core.task.TaskRejectedException: Executor [java.util.concurrent.ThreadPoolExecutor@2ac9ed6a[Running, pool size = 3, active threads = 3, queued tasks = 0, completed tasks = 63125]] did not accept task: org.springframework.cloud.aws.messaging.listener.SimpleMessageListenerContainer$SignalExecutingRunnable@413077b6 at org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.execute(ThreadPoolTaskExecutor.java:317) at org.springframework.cloud.aws.messaging.listener.SimpleMessageListenerContainer$AsynchronousMessageListener.run(SimpleMessageListenerContainer.java:343) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) Solution: Add this bean configuration Copy to Clipboard@Configuration public class SqsListenerConfiguration { @Bean @Primary public SimpleMessageListenerContainerFactory simpleMessageListenerContainerFactory(AmazonSQSAsync amazonSqs) { SimpleMessageListenerContainerFactory factory = new SimpleMessageListenerContainerFactory(); factory.setAmazonSqs(amazonSqs); factory.setMaxNumberOfMessages(10); factory.setWaitTimeOut(10); factory.setQueueMessageHandler(new QueueMessageHandler()); return factory; } } By admin|2020-06-29T06:47:39+00:00June 29th, 2020|Uncategorized|0 Comments Related Posts Force specific library version in Maven and Gradle Force specific library version in Maven and Gradle December 14th, 2021 | 0 Comments Restore .wt to local MongoDB Restore .wt to local MongoDB October 27th, 2020 | 0 Comments Drools memory leak Drools memory leak June 30th, 2020 | 0 Comments Drools: Caused by: java.util.zip.ZipException: invalid stored block lengths Drools: Caused by: java.util.zip.ZipException: invalid stored block lengths June 27th, 2020 | 0 Comments Leave A Comment Cancel replyComment Save my name, email, and website in this browser for the next time I comment.
Leave A Comment