How does Amazon's SQS notify one of my "worker" servers whenever there is something in the queue?

TIMEX picture TIMEX · Nov 14, 2010 · Viewed 12.2k times · Source

I'm following this tutorial: http://boto.s3.amazonaws.com/sqs_tut.html

When there's something in the queue, how do I assign one of my 20 workers to process it?

I'm using Python.

Answer

Nicholas Knight picture Nicholas Knight · Nov 14, 2010

Unfortunately, SQS lacks some of the semantics we've often come to expect in queues. There's no notification or any sort of blocking "get" call.

Amazon's related SNS/Simple Notification Service may be useful to you in this effort. When you've added work to the queue, you can send out a notification to subscribed workers.

See also:

http://aws.amazon.com/sns/

Best practices for using Amazon SQS - Polling the queue