1
votes

I am new to AWS. I want to understand what is a good way to poll SQS for messages. I found many posts about long/short polling but not much discussion on how to implement it. Is an infinite while loop with wait a good way to poll SQS?

P.S. This is for a school project and I am not allowed to use AWS lambda, cloudwatch, etc; only SQS/S3/EC2 for the entire application.

1

1 Answers

2
votes

An infinite while loop is a standard pattern for SQS polling. If you use long polling you will not have to add a wait/pause, as the long polling does that for you.