gpt4 book ai didi

java - AWS SNS 响应处理

转载 作者:太空宇宙 更新时间:2023-11-04 10:40:15 25 4
gpt4 key购买 nike

我是新来为我的 Java 程序实现 AWS SNS SMS 网关的。成功向AWS发布消息后,我想知道消息是否发送?即使消息发送失败,它也总是给出带有 messageId 的响应。是否有任何特定的方法或 API 可以为此公开?

最佳答案

来自SNS FAQ :

Q: How do I track the delivery status of my SMS messages?

By enabling the Delivery Status feature in Amazon SNS, you can get information on the following for each message: MessageID, Time Sent, Destination Phone Number, Disposition, Disposition Reason (if applicable), Price, and Dwell Time.

换句话说,来自文档:

Amazon Simple Notification Service (Amazon SNS) provides support to log the delivery status of push notification messages. After you configure application attributes, log entries will be sent to CloudWatch Logs for messages sent from Amazon SNS to mobile endpoints. Logging message delivery status helps provide better operational insight, such as the following: * Know whether a push notification message was delivered from Amazon SNS to the push notification service. * Identify the response sent from the push notification service to Amazon SNS. * Determine the message dwell time (the time between the publish timestamp and just before handing off to a push notification service).

引用,检查代码示例: https://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html

看来您准备使用 cloudwatch 来实现此目的。您从 API 获得的 messageid 当然对于过滤信息很有用。

我建议您开具 AWS 支持票证(因为您有进一步的问题作为评论):如需专业支持,我建议向他们立案:https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-sns-text-messaging

关于java - AWS SNS 响应处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49063833/

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