微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

AWS SNS“ maxReceivesPerSecond”策略无法按预期运行

如何解决AWS SNS“ maxReceivesPerSecond”策略无法按预期运行

根据AWS文档(https://aws.amazon.com/blogs/aws/new-features-for-amazon-sns-delivery-policies-and-message-formatting/

maxReceivesPerSecond –每秒最大尝试传送次数 每个订阅

我已将值配置为1,这意味着订阅应该每秒触发1个呼叫。但是,触发20个呼叫大约需要30分钟。有人可以建议如何设置它,以便每秒触发一次API调用吗?

Pipedream log confirming that calls were received not 1 per second

如果未配置此属性(maxReceivesPerSecond),则会如下所示立即触发API调用

Pipedream receives all APIs instantly

在这里,我的SNS策略设置为将请求的速度限制为每秒1次

{“ http”:{ “ defaultHealthyRetryPolicy”:{ “ numRetries”:3, “ numNoDelayRetries”:0, “ minDelayTarget”:20, “ maxDelayTarget”:20, “ numMinDelayRetries”:0, “ numMaxDelayRetries”:0, “ backoffFunction”:“线性” }, “ disableSubscriptionOverrides”:否, “ defaultThrottlePolicy”:{ “ maxReceivesPerSecond”:1 }}

解决方法

maxReceivesPerSecond存在一个已知问题。删除限制策略,然后等待AWS解决该问题。有关详细信息,请参见https://cloudonaut.io/loosing-trust-in-aws-sns-broken-for-24-days/https://marbot.io/blog/how-to-fix-delayed-alarms.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。