Is it possible to run few queue listeners on the same server? Sometimes, when running 2 listeners, they appear to take the same task and produce an error in task logic. Using amazon queue service
Make sure you check that the queue timeout is set correctly, if it takes say 5 seconds to complete a job, you need to make sure that the queue job won't be released to an other worker too.
@zuzex for that you need to keep track of the jobs you are processing. If you push a job to the db, add a record to a table in the db, once your worker picks up the job the first thing you do is marking that job as currently in process in the table (a in_progress column?), once the job is finished you will mark the job as processed.
Each worker who picks op a job firsts checks if the job is not locked by an other worker.
@sitesense We were facing a similar problem and found that we need to configure Visibility Timeout in SQS to make that job locks for that many seconds.