Amazon SNS 移动推送 - 如何批量订阅主题的端点? [英] Amazon SNS Mobile Push - how to bulk subscribe endpoints to a topic?

查看:31
本文介绍了Amazon SNS 移动推送 - 如何批量订阅主题的端点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我现有的 iOS 推送通知基础设施转移到亚马逊 SNS 移动推送.

I am trying to move my existing iOS push notification infrastructure over to amazon SNS mobile push.

我将所有令牌从本地数据库导出到 SNS 应用程序(使用 CSV).现在我想向我所有的 10,000 个用户发送推送通知.我认为唯一的方法是创建一个主题并将所有用户订阅到该主题,然后向该主题发布消息.

I exported all my tokens from my local db into an SNS application (using CSV). Now I want to send push notification to all my 10,000 users. I think the only way is to create a topic and subscribe all the users to that topic then publish message to that topic.

有没有什么简单的方法可以让我导入系统的所有 10,000 个用户订阅一个主题?

Is there any easy way to subscribe all the 10,000 users who I have imported into the system to a topic?

感谢您的帮助!

推荐答案

听起来您已经创建了 Amazon SNS 平台应用程序并将您的令牌导入为 Amazon SNS 平台终端节点.

It sounds like you have created the Amazon SNS Platform Application and imported your tokens as Amazon SNS Platform Endpoints.

你发送什么样的通知?

  • 如果您向每个用户发送自定义消息,请使用直接寻址.通过这种方法,您发布到每个EndpointARN.

  • If you send a custom message to each user, use Direct Addressing. With this approach, you Publish to each EndpointARN.

如果您向所有用户发送相同的消息,请使用主题.您需要为端点订阅主题.当您准备好发送时,PublishTopicARN.Amazon SNS 将处理向订阅该主题的所有终端节点的传输.Amazon SNS 目前不提供批量订阅 API,因此您必须为每个 EndpointARN 调用一次 Subscribe.

If you send the same message to all users, use topics. You need to subscribe your endpoints to a topic. When you are ready to send, Publish to the TopicARN. Amazon SNS will handle delivery to all endpoints subscribed to that topic. Amazon SNS currently does not provide a bulk subscribe API, so you will have to invoke Subscribe once per EndpointARN.

完全披露:我在 Amazon SNS 上为 AWS 工作.

这篇关于Amazon SNS 移动推送 - 如何批量订阅主题的端点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆