I have very huge camel pipeline which starts from consuming message from SQS. The time requires for whole process is vary. From 5 sec to 30 min, it is hard to guess here.
What I want to achieve:
What I already tried:
Thank you for help!
You should certainly NOT delete the message as soon as you consume it if you are not finished processing it because you will lose the message if your application crashes.
What you should do instead is extend the visibility timeout manually if you realize that your processing time gets close to the original visibility timeout. Not sure how you would implement it in Camel but we previously integrated into the default springframework.cloud.aws.messaging
: https://github.com/Mercateo/sqs-utils
One option is to add an exception handler and mark the exception as handled calling handled(true)
on the OnExceptionDefinition
.
Another workaround is to send the message to a wireTap
and do your processing there. This ends the route and causes a deleteMessage
to be sent to the queue.
I myself am still looking for a other options tho.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.