FCM:消息到多个注册ID限制? [英] FCM: Message to multiple registration ids limit?

查看:557
本文介绍了FCM:消息到多个注册ID限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据这个报价,我发现:



  • registration_ids - 类型字符串数组 - (可选)[收件人消息]
    多注册令牌,最小值1最大1000.


这是我可以发送单个消息的设备令牌的实际限制吗?而消息的主题有相同的限制?



  {
to:[reg_token_01,reg_token_02,...,reg_token_1000],
priority:high,
data:{
title :偷看!,
消息:这是一个特殊的消息只为你...更多的细节可用...


与往常一样,感谢您的信息和方向!

registration_ids 参数时,可以发送给注册令牌的最大数量是1000 。我很确定你在官方文档中看到了。



所以,如果你仍然打算使用 registration_ids 参数,但你需要发送到1000以上,你可以按照@Eran在他的答案这里


如果您需要将相同的消息发送到1000个以上的注册ID,您只需将发送过程分成1000个注册ID组。每个组都会发送一个单独的请求到GCM服务器。







然而,说到话题,没有限制。曾经有过,但几年前就报废了。我已经提到过我之前的答案:



不可以。根据2015年12月的博客


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





不。看到FCM以GCM为核心,任何应用的主题数量都没有限制。曾经有一百万的限制,但它被删除。你可以参考这个 Google Developers Blog

另外,在创建主题时FCM,按照这个帖子,它似乎需要一天时间才能使用。


As per this quote I found:

  • registration_ids – Type String array – (Optional) [Recipients of a message] Multiple registration tokens, min 1 max 1000.

Is this the actual limit of device tokens I can send a single message to? And do messages to topics have the same limit?

ex:

{
  "to": [reg_token_01, reg_token_02, ..., reg_token_1000],
  "priority": "high",
  "data": {
    "title": "Hi Peeps!",
    "message": "This is a special message for only for you...  More details are available..."
  }
}

As always, thanks for the info and direction!

解决方案

Seeing as FCM is based from the GCM core, the maximum number of registration tokens you can send to when using the registration_ids parameter is 1000. I'm pretty sure you did see that in the official documentation.

So if ever you still intend to use the registration_ids parameter but you need to send it to more than 1000, you can follow what was @Eran said in his answer here:

If you need to send the same message to more than 1000 Registration IDs, you simply split the sending process into groups of 1000 Registration IDs. Each group would be sent in a separate request to GCM server.


However, when it comes to topics, there is no limit. There used to be, but it was scrapped years ago. I have mentioned it my previous answers before:

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.

Nope. Seeing that FCM has GCM as its core, there is no limit in the number of Topics for any app. There used to be a 1 million limit, but it was removed. You can refer to this Google Developers Blog for that.

Also, when creating a Topic in FCM, it would seem that it takes a day for it to be available, as per this post.

这篇关于FCM:消息到多个注册ID限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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