I'm using python and when I read things from SQS they don't get removed properly and they get read again a few seconds later.
I use this code snippet to post a job
#!/usr/bin/python
#simple code snippet that posts a message to SQS
import boto
from boto.sqs.message import Message
conn = boto.connect_sqs()
q = conn.create_queue('myqueue')
newJob.set_body("Message")
q.write(newJob)
Here is the code that digests messages
#!/usr/bin/python
#simple code snippet that reads a message from SQS
import boto
from boto.sqs.message import Message
conn = boto.connect_sqs()
q = conn.get_queue('myqueue')
while True:
try:
print q.read(10).get_body()
except:
pass
After running both scripts the second one will print out 'Message' every 15 seconds or so.
I'm really confused as to why it's not being removed AND why it comes back only after 15 seconds. (It also doesn't show up in the AWS console, and messages I send from there are never processed)