spring-attic / spring-cloud-aws

All development has moved to https://github.com/awspring/spring-cloud-aws Integration for Amazon Web Services APIs with Spring
https://awspring.io/
Apache License 2.0
590 stars 373 forks source link

[SQS] Auto extend visibility timeout for long tasks #635

Open aniketbhatnagar opened 4 years ago

aniketbhatnagar commented 4 years ago

Is your feature request related to a problem? Please describe. When processing background tasks that take long and having varying time to complete, it's not efficient to set the SQS queue's visibility timeout to be very high. It would be great if the SQS poller could auto extend visibility timeout (until possible) for messages that are being processed.

Describe the solution you'd like An option like https://camel.apache.org/components/latest/aws2-sqs-component.html (extendMessageVisibility option) or https://github.com/TomFrost/Squiss (opts.autoExtendTimeout).

Describe alternatives you've considered Current alternate is to use Visibility parameter added in https://github.com/spring-cloud/spring-cloud-aws/pull/215 in each listener method to either upfront increase visibility or increase it via a background thread. It would be great if listener implementations do not have to worry about it.