Google 云消息限制

Google cloud messaging Limit

我知道现场有类似的问题,但我很困惑,因为httpxmpp有差异限制:

this page说出httpxmpp的区别。

第一个限制是 [xmpp & http]:最多 4KB 的数据

第二个限制是:

http: 您一次可以向 1000 个用户发送消息。 (ref)

xmpp: 对于每个发件人 ID,GCM 允许 1000 个并行连接。 (ref)

You can send out a message to 1000 users at a time. so if you have more users you'll have to send the message multiple times from your server but to different users each time (ref)

第三个限制是:

http: 我在 android 中找不到这个限制 developer:

There is a limit on how many messages can be stored without collapsing. That limit is currently 100. If the limit is reached, all stored messages are discarded. Then when the device is back online, it receives a special message indicating that the limit was reached. The application can then handle the situation properly, typically by requesting a full sync. (ref)

xmpp:

Every message sent to CCS receives either an ACK or a NACK response. Messages that haven't received one of these responses are considered pending. If the pending message count reaches 100, the app server should stop sending new messages and wait for CCS to acknowledge some of the existing pending messages (ref)

我的问题:

1.in第二个限制,如果我们使用http方式,有2000个用户,是否应该发送两次消息,每次发送给1000个用户?可以吗?

2.xmpp不支持多播消息,我们可以在xmpp中使用多播主题吗?

  1. 按主题广播消息有什么限制吗? (除外)

4.in第三个限制,如果我给300个用户发送消息,100个top用户离线,他们收到message还是任何notification什么时候回来上线? (注意:对 http 使用广播,对 xmpp 使用循环)

  1. 在主题方式中做这个限制效果吗?

  2. httpxmpp 之间的第三个限制是否存在差异?

7.exists httpxmpp?

中的其他限制
  1. 是的,你可以做到。使用 HTTP 时,您的批量大小可能为 1000(收件人)。

  2. 是的。 Topic 消息是 PubSub 方法,如果您的客户注册了给定主题,您只需一个请求就可以向所有客户发送推送通知。

  3. 无限制。曾经 Topic Messaging 上每个应用程序的订阅者限制为 100 万,现在不存在了。

  4. 你把第三个限制弄糊涂了:

    • 第一个 (HTTP) 是关于一个客户,而不是所有客户。因此,如果您在一个客户离线时向他发送超过 100 条消息,当他再次上线时,其中 none 条消息将被传送。
    • 第二个 (XMPP) 是关于所有队列的,它发生在服务器端。这意味着如果那里存在超过 100 条未确认的消息,则您不必向 GCM 发送任何消息。

    所以考虑到离线用户没有问题,当他们重新在线时,GCM 将处理向所有这些用户发送消息。

  5. 没有

  6. 我在4里解释过了

  7. 不记得了