亚马逊SNS移动推送 - 如何批量订阅端点一个主题? [英] Amazon SNS Mobile Push - how to bulk subscribe endpoints to a topic?
问题描述
我想将我现有的iOS推送通知的基础设施转移到亚马逊SNS移动推送。
I am trying to move my existing iOS push notification infrastructure over to amazon SNS mobile push.
我出口我的所有令牌从我的本地数据库到(使用CSV)的SNS应用。现在我想推送通知发送给我的所有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?
感谢您的帮助!
推荐答案
这听起来像你所创建的亚马逊SNS平台应用程序和进口的令牌亚马逊SNS平台的端点。
It sounds like you have created the Amazon SNS Platform Application and imported your tokens as Amazon SNS Platform Endpoints.
什么样的通知,你送?
What kind of notification are you sending?
-
如果您发送自定义消息给每个用户,使用直接
寻址。通过这种方法,你发布
每个EndpointARN
。
If you send a custom message to each user, use Direct Addressing. With this approach, you
Publish
to eachEndpointARN
.
如果您发送相同的消息给所有用户,使用主题。您需要申请端点到一个主题。当你准备发送,发布
到 TopicARN
。亚马逊SNS将处理传递给订阅了该主题的所有端点。亚马逊SNS目前不提供批量订阅API,所以你将不得不调用订阅
一旦每 EndpointARN
。
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
.
的披露:我为AWS工作在Amazon SNS 的
这篇关于亚马逊SNS移动推送 - 如何批量订阅端点一个主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!