andy265
December 15, 2018, 7:50am
1
Hello,
Question: How to create Amazon SQS Long Polling?
My target is made the cost lower.
About Amazon SQS Long Polling: Amazon SQS short and long polling - Amazon Simple Queue Service
I tried to add ReceiveMessageWaitTimeSeconds
MyQueue:
Type: "AWS::SQS::Queue"
Properties:
QueueName: MyQueue
ReceiveMessageWaitTimeSeconds: 20
And it has an effect on the settings:
Receive Message Wait Time: 20 seconds
But I still have a lot of NumberOfEmptyReceives : Screenshot by Lightshot .
1 Like
Did you ever get this figured out? I’m seeing a very similar trend with my sqs usage. Even when not in use at all, i’m getting avg. 99 NumberOfEmptyReceives a minute.
ifiok
April 23, 2019, 10:06am
3
Hello @adam-t-b @andy265 . Did you find a way around this?
sators
July 22, 2020, 1:55pm
4
Anyone ever figure out a way to do this within the serverless.com configuration? Having the same issue…
suphero
November 29, 2022, 8:25pm
5
I’ve found a way to enable long polling both for queue and dead letter queue (dlq).
constructs:
my-queue:
type: queue
worker:
handler: src/worker.handler
extensions:
queue:
Properties:
ReceiveMessageWaitTimeSeconds: 20
dlq:
Properties:
ReceiveMessageWaitTimeSeconds: 20
References: