gpt4 book ai didi

java - 确认 SNS 订阅者的 HTTP 端点

转载 作者:行者123 更新时间:2023-12-01 10:29:08 24 4
gpt4 key购买 nike

当我使用云形成创建 SNS 主题并同时配置 HTTP 端点时,HTTP 端点可能当时无法正常工作。

那么是否可以设置在稍后阶段重试发送这些确认请求。

我的用例是,HTTP 端点将位于我的 EC2 实例之一上,该实例是作为同一 Clodformation 的一部分创建的,然后我使用 AWS CodeDeploy 来部署我的 Web 应用程序。

因此,在 SNS 尝试确认订阅者端点之前,EC2 实例很可能尚未完全初始化或代码部署未完成

最佳答案

显然,您可以...通过在端点或主题上配置重试策略。

If Amazon SNS doesn't receive a successful response from your endpoint, it attempts to deliver the message again. This applies to all messages, including the subscription confirmation message. By default, if the initial delivery of the message fails, Amazon SNS attempts up to three retries with a delay between failed attempts set at 20 seconds. Note that the message request times out at 15 seconds. This means that if the message delivery failure was caused by a timeout, Amazon SNS will retry approximately 35 seconds after the previous delivery attempt. If you don't like the default delivery policy, you can set a different delivery policy on the endpoint. (emphasis added)

http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html

关于java - 确认 SNS 订阅者的 HTTP 端点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35183635/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com