Google cloud messaging Limit
Asked Answered
W

1

4

I know that exists similar questions on site, but I confused because http and xmpp have difference limit:

this page say differences between http and xmpp.

first limit is [xmpp & http]: up to 4KB of data

second limit is:

http: You can send out a message to 1000 users at a time. (ref)

xmpp: For each sender ID, GCM allows 1000 connections in parallel. (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)

third limit is:

http: I couldn't found this limit in 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)

my questions:

1.in second limit, if we use http method and have 2000 users, should we send message twice, every time to 1000 users?, can we do it?

2.xmpp can not support multicast messaging, can we use topic for multicast in xmpp?

  1. any limit on broadcast messaging by topics? (except ref)

4.in third limit, if i send a message to 300 users, and One hundred top users be offline, do they recieve message or any notification when come back and online? (note: use broadcast for http and loop for xmpp)

  1. do this limit effect in topic way ?

  2. do exists any difference in third limit between http and xmpp?

7.exists other limit in http or xmpp?

Warmhearted answered 16/1, 2016 at 10:59 Comment(0)
K
6
  1. Yes you can do that. While using HTTP you may have a batch size of 1000(recipients).

  2. Yes. Topic messages is PubSub method and if your clients registered to a given topic, you can sent a push notification to all of them with just one request.

  3. No limitation. Once there was a 1 million subscriber limit per app on Topic Messaging, which doesn't exist anymore.

  4. You confused the third limit:

    • The first one (HTTP) is about a single client, not all of them. So if you send more than 100 messages to a single client while he is offline, when he gets back online again, none of them will be deliver.
    • The second one (XMPP) is about all of the queue and it happens in the server side. It means you have to send no messages to GCM if there exists more than 100 unACKed messages there.

    So you have no problem considering offline users, GCM will handle to deliver message to all of them, when they come back online.

  5. No.

  6. I explained it in 4.

  7. I don't remember any more.

Kenaz answered 18/1, 2016 at 5:0 Comment(8)
pubsub pattern is realtime in other system (wamp or amqp), it means that user must be connected on socket to be able to get message, does it have same behavior in gcm? (if user be offline, he will get messages from topics that he subscribe to them, when he come back?Warmhearted
@Warmhearted Yes, GCM will deliver the message to offline users, if they come back online again. There exists a key named TTL (Time To Live) which you should specify in your JSON message to tell GCM, how long it should keep the message, if the user don't come back online.Kenaz
@Warmhearted You may also take a look at pushe.co which is Push notification service in Iran based on GCMKenaz
@Kenaz 1 )With xmpp how can we send messages to > 1000 users, as it supports only 1000 parallel connection ! 2) One app will just send messages and other app will only receive messages, two are different app for my requirement, Shall i go for XMPP or HTTPMaleficence
@bikash 1. XMPP supports 1000 parallel connections, and you can send multiple request per connection, there is no limit on this. 2. if you need to send upstream messages, you have to use XMPPKenaz
@Kenaz Can you send me any link where sample code can be found for XMPP with many connections sending diff request, Google docs was just not enough !Maleficence
@bikash Sorry , I don't have a link, but if I found something for you I will send it to you ASAP.Kenaz
If i have two projects in same account. then i can able to send messages to 2000 recipients at a time or 1000 messages at a time ?Geffner

© 2022 - 2024 — McMap. All rights reserved.