Questions tagged [amazon-sqs]

Amazon Simple Queue Service (Amazon SQS) offers a reliable, highly scalable, hosted queue for storing messages as they travel between computers.

Resources

Tutorial

4134 questions
30
votes
6 answers

Pattern to continuously listen to AWS SQS messages

I have a simple class named QueueService with some methods that wrap the methods from the AWS SQS SDK for Java. For example: public ArrayList> receiveMessages(String queueURL) { List messages =…
Francisco Hanna
  • 1,137
  • 1
  • 11
  • 27
30
votes
2 answers

SQS delivering a message only once

Let's say I have 100 threads reading from the same sqs -- is it guaranteed that each message is going to be delivered at-most once? Is it at all possible to deliver the same message more than once? I can't find any clear documentation on this issue.…
Vladimir
  • 2,481
  • 4
  • 31
  • 41
30
votes
7 answers

Get number of messages in an Amazon SQS Queue

Just a simple question, but I can't seen to find the answer. Is it possible to use the API, to get the queue size (the number of messages/jobs waiting to be processed) of an AWS SQS queue? Preferably using cURL or the PHP SDK.
Martijn Thomas
  • 861
  • 3
  • 13
  • 24
29
votes
3 answers

What are the possible use cases for Amazon SQS or any Queue Service?

So I have been trying to get my hands on Amazon's AWS since my company's whole infrastructure is based of it. One component I have never been able to understand properly is the Queue Service, I have searched Google quite a bit but I haven't been…
thedeliciousmuffin
  • 784
  • 1
  • 10
  • 22
29
votes
4 answers

What does visibility Timeout mean for AWS SQS

What is the meaning of "Visibility Timeout" for Amazon SQS service ? What factors determine an ideal value for this field ? I have looked at http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/Welcome.html
Eastern Monk
  • 6,395
  • 8
  • 46
  • 61
28
votes
4 answers

How to add SQS message attributes in SNS subscription?

The documentation for AWS SNS and SQS have sections about message attributes. But there is no explanation how to have SQS message attributes when that queue is subscribed to a SNS topic. Is there a way to configure AWS SNS to add particular message…
Evgeny
  • 6,533
  • 5
  • 58
  • 64
28
votes
4 answers

AWS SQS not receiving SNS messages

I created a SNS topic that publishes all the information coming out of Cloudformation via the cli. However, when I check the queue, it is not receiving any of the SNS messages. I verified the SNS is working by subscribing my email to it, so the…
asdf
  • 2,927
  • 2
  • 21
  • 42
28
votes
1 answer

Amazon SQS message multi-delivery

I understand that to bring vast scalability and reliability, SQS does extensive parallelization of resources. It uses redundant servers for even small queues and even the messages posted to the queues are stored redundantly as multiple copies. These…
inquisitive
  • 3,549
  • 2
  • 21
  • 47
27
votes
1 answer

AWS SQS message retention period

According to documentation the maximum SQS message retention period(MessageRetentionPeriod) is 14 days. After that time message will be deleted from the queue. Is any way with SQS to not lose these messages after their retention period expired? For…
alexanoid
  • 24,051
  • 54
  • 210
  • 410
26
votes
3 answers

Can't trigger lambda's on SQS FIFO

I am trying to trigger lambda execution to execute an item on a FIFO queue. Other than polling, what options do we have to accomplish that? We just learned that we cannot directly trigger a lambda execution from a FIFO queue, which is only supported…
845614720
  • 756
  • 1
  • 7
  • 22
26
votes
4 answers

SQS Lambda - retry logic?

When the message has been added to an SQS queue and it is configured to trigger a lambda function (nodejs). When a lambda function is triggered - I may want to retry same message again after 5 minute without deleting the message from the Queue. The…
I'll-Be-Back
  • 10,530
  • 37
  • 110
  • 213
26
votes
3 answers

Best practice for polling an AWS SQS queue and deleting received messages from queue?

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. The way I designed it is that I will have 10-20 threads all trying to read…
Mo.
  • 40,243
  • 37
  • 86
  • 131
26
votes
1 answer

Release a message back to SQS

I have a some EC2 servers pulling work off of a SQS queue. Occasionally, they encounter a situation where the can't finish the job. I have the process email me of the condition. As it stands now, the message stays "in flight" until it times out. …
David S
  • 12,967
  • 12
  • 55
  • 93
26
votes
2 answers

Max AWS SQS Queues

Does anyone know what the maximum amount of queues I can create is? I've look around on AWS and can't seem to find the answer. I might have almost 50 different queues at the end of this project and want to make sure I am not running out of runway...
Matt
  • 3,638
  • 2
  • 26
  • 33
26
votes
6 answers

How to get all messages in Amazon SQS queue using boto library in Python?

I'm working on an application whose workflow is managed by passing messages in SQS, using boto. My SQS queue is growing gradually, and I have no way to check how many elements it is supposed to contain. Now I have a daemon that periodically polls…
Charles Menguy
  • 40,830
  • 17
  • 95
  • 117