来自https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-queueconfig
将队列可见性超时设置为函数超时的 6 倍,加上以下值
MaximumBatchingWindowInSeconds
为什么队列可见性超时不能等于函数超时?假设该函数的超时时间为 30 秒,队列可见性也是如此。该函数拾取消息并经过 30 秒,该消息尚未删除,现在对其他函数/消费者可见。那为什么一定要6次呢?最大批处理窗口在队列可见性超时中扮演什么角色?
我有这个脚本init.ps1
param($s)
write-host $s
write-host $args
...
Run Code Online (Sandbox Code Playgroud)
这个想法是,当我调用 时init.ps1 service up,$s将为空,并且$args将为service up。
但当我这样做时,我得到了$sas service, $argsas $up。
例如,我打算仅$s用于启动身份验证服务。init.ps1 service up -s auth
知道如何解决这个问题吗?