Google Cloud Messaging上的主题最大数量 [英] Maximum number of topics on Google Cloud Messaging

查看:91
本文介绍了Google Cloud Messaging上的主题最大数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想避免在应用程序级别管理设备令牌的复杂性
$ b


  1. 一位用户在iOS和Android上使用多个设备

    li>
  2. 订阅应用程序组的多个用户

将#1和#2视为GCM上的主题是显然是一个简单的解
所以我只需要在发送通知时处理我的Application UserIds和GroupIds。


$ b <1>当设备注册时(iOS / Android),我只是订阅该设备的主题[USER_A,GROUP_A,GROUP_B]



2)发送通知时,只发送给主题。然而,这意味着,话题数量=用户+群体。

<100万用户+ 500K组= 150万个GCM主题



我的问题是......


  1. 有没有限制到GCM主题的数量?

  2. 有没有更好的方法来避免管理设备订阅,而无需在传递消息时处理其复杂性。


解决方案

#1:不。根据去年12月的博客 2015年:


我们现在很高兴宣布我们允许为您的应用提供无限免费主题。这意味着应用程序开发人员可以在每个主题中放置无限数量的设备,并创建无限数量的主题。


据我所知,但主题数量方面仍未发生任何变化。



#2

我认为这很大程度上取决于您的偏好。对于#1中的用例,我认为Device Group Messaging是可以使用的。但是因为你的目标是避免太多的复杂性,所以我认为你使用Topic Messaging所做的几乎就是这样。实际上,我发现这个帖子有点讨论在两者之间使用什么,如果您愿意的话,评论非常有启发性。 :D



干杯! :)

I want to avoid the complexities of managing Device Tokens at the application level

  1. One user using multiple devices on iOS and Android
  2. Multiple users subscribed to an application group

Treating #1 and #2 as topics on GCM is obviously an easy solution. So that I only have to deal with my Application UserIds and GroupIds while sending notifications.

1) When device is registering (iOS/Android), I just subscribe the device to topics ["USER_A", "GROUP_A", "GROUP_B"]

2) When sending a notification, just send to a topic.

However, that means, number of topics = users + groups.

1 million users + 500K groups = 1.5 million topics on GCM

My question is..

  1. Is there any limit to the number of topics on GCM?
  2. Is there a better approach to avoid managing device subscriptions without having to deal with its complexities when delivering messages.

解决方案

For #1:

Nope. As per their blog last December 2015:

We’re now happy to announce that we’re allowing unlimited free topics for your app. This means app developers can place an unlimited number of devices within each topic and create an unlimited number of topics.

As far as I know, there still hasn't been any changes with regards to the number of topics.

For #2:

I think it pretty much depends on your preference. For your use case in #1, I think that Device Group Messaging is the one to use. But since you're aiming to avoid too much complication, I think what you did using Topic Messaging is pretty much it. I actually found this post that kinda discusses what to use between the two, the comments are very enlightening, if you will. :D

Cheers! :)

这篇关于Google Cloud Messaging上的主题最大数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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