0

I have cronjob attached lambda running for every 5 minutes and processing SQS messages. In my queue have messages of more than 500. I need to retrieve all data and map each other based on ID. By default, I can able to retrieve only 10 messages. Is there any possibility to retrieve more than 10 messages?

1 Answer 1

1

Not in a single request, as you can see in the documentation, but you can just keep going. Just keep getting more, until there are none left.

To expand, the answer depends on which sdk you're using, but the api is the same. You just use something like a while loop where the condition checks the length of the list of messages returned. If that list is empty you leave the loop and finish. If it isn't empty you repeat the request.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.