Initially, I used one thread to listen on the queue with amazon and worked fine.

aws.rb
Thread.new do
queue = AWS::SQS::Queue.new(SQSADDR['my_queue'])
queue.poll do |msg|
...
but now I added another thread to listen to another queue:
...
Thread.new do
queue = AWS::SQS::Queue.new(SQSADDR['my_another_queue'])
queue.poll do |msg|
...
and now doesn't seem to work. Only the last one gets the answer ...
What's happening?
source
share