CoorpAcademy / serverless-plugins

Collection of serverless plugins :zap:
230 stars 131 forks source link

[serverless-offline-sqs] Support for maximumBatchingWindow #227

Open tomusiaka opened 1 year ago

tomusiaka commented 1 year ago

Based on non-offline functionality and docu, it is possible to set maximumBatchingWindow. This sends MaximumBatchingWindowInSeconds attribute to SQS ReceiveMessage action. Offline that would be simulated using WaitTimeSeconds attribute in receiveMessage action. However, serverless-offline-sqs plugin seems to ignore that setting. Wait time is always 5 seconds, which appears to be hard-coded in the receiveMessage request.

terozio commented 1 year ago

This makes local testing super slow if you want to do something message per message when you always need to wait before the lambda function is triggered.