I'm working on integrating Spring Integration with AWS SQS queue.
I have an issue when my method annotated with @ServiceActivator
throws an exception. It seems that in such cases the message is removed from the queue anyway. I've configured MessageDeletionPolicy
to ON_SUCCESS
in SqsMessageDrivenChannelAdapter
.
Here is my channel/adapter configuration https://github.com/sdusza1/spring-integration-sqs/blob/master/src/main/java/com/example/demo/ChannelConfig.java
I've tried doing the same using @SqsListener
annotation and messages are not deleted as expected.
I've created a mini Spring Boot app here to demonstrate this issue: https://github.com/sdusza1/spring-integration-sqs
Please help :)