Error = TooManyMessages GCM

I started to implement GCM.

I use the official official Google tutorial .

I did not find ANYTHING about this error on Google. Does anyone know what that means?

I got it from BroadcastReceiver:

if (GoogleCloudMessaging.MESSAGE_TYPE_SEND_ERROR.equals(messageType)) { sendNotification("Send error: " + intent.getExtras().toString()); Log.i(TAG, "Send error: " + intent.getExtras().toString()); 07-11 16:56:55.083: I/GCMDemo(3425): Send error: Bundle[{error=TooManyMessages, message_type=send_error, google.message_id=1}] 
+4
source share
2 answers

This means that you sent more than 100 messages without a key to collapse to the same device when the device was disconnected. Once this restriction was reached, the GCM server discarded the saved messages and sent TooManyMessages error to the device when it returned to the network.

Note. The message limit can be saved without being wrinkled. This limit is currently 100. If the limit is reached, all saved messages will be discarded. Then, when the device is reconnected to the network, it receives a special message indicating that the limit has been reached. Then the application can correctly handle the situation, usually by requesting full synchronization.

+2
source

This message appears on the device when you try to recreate a message from it to CCS, and the out queue is already full. This local queue is filled with messages that GCM cannot send due to network inaccessibility. Here, you probably filled the queue and restarted the application (which is why you messageId is 1). A limit of 20 unsent messages per application is stored on the device (this was detected by testing, not specified by AFAIK).

0
source

Source: https://habr.com/ru/post/1490931/


All Articles