title: Best practice for polling an AWS SQS queue and deleting received messages from queue?
body: <p>I have an SQS queue that is constantly being populated by a data consumer and I am now trying to create the service that will pull this data from SQS using Python's boto.</p>
  
  <p>The way I designed it is that I will have 10-20 threads all trying to read messages from the SQS queue and then doing what they have to do on the data (business logic), before going back to the queue to get the next batch of data once they're done. If there's no data they will just wait until some data is available. </p>
  
  <p>I have two areas I'm not sure about with this design</p>
  
  <ol>
  <li>Is it a matter of calling receive_message() with a long time_out value and if nothing is returned in the 20 seconds (maximum allowed) then just retry? Or is there a blocking method that returns only once data is available? </li>
  <li>I noticed that once I receive a message, it is not deleted from the queue, do I have to receive a message and then send another request after receiving it to delete it from the queue? seems like a little bit of an overkill.</li>
  </ol>
  
  <p>Thanks </p>