How to create Amazon SQS Long Polling?

Hello,

Question: How to create Amazon SQS Long Polling?
My target is made the cost lower.

About Amazon SQS Long Polling: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html

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: https://prnt.sc/lv87gz .

2 Likes

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.

Hello @adam-t-b @andy265 . Did you find a way around this?

Anyone ever figure out a way to do this within the serverless.com configuration? Having the same issue…