Rate Limit Exceeded error when using Google Cloud Messaging API

后端 未结 2 1568
暗喜
暗喜 2021-01-11 15:51

When using the Google Cloud Messaging API to send messages between a backend server and an Android/Chrome client, the backend server can, at times, receive a rate limit exce

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-11 16:25

    CCS downstream ack is not accounted in the quota.

    The DeviceMessageRateExceeded quota is hit when you send too many messages to a single device - you don't need to backoff all sending, just to that registration ID. Please make sure you handle "Canonical" registration ID response - it is possible to have multiple regids pointing to the same device.

    The 'quota_exceeded' was used in C2DM - GCM doesn't currently return it. If anyone is still using C2DM - the handling is to throttle/backoff sending for all messages. Or even better - to migrate to GCM which doesn't have this global quota.

提交回复
热议问题