How many topics an app instance can subscribe in FCM?
如FCM文档所述,可以为一个Firebase应用程序创建无限的主题。但是作为Firebase Admin SDK文档:解释错误:
messaging/too-many-topics:- A registration token has been subscribed to the maximum number of topics and cannot be subscribed to any more.
我找不到最大主题数的阈值。谁能解释,极限是多少?一个应用实例可以在FCM中订阅多少个主题?
我通过运行应用程序实例的订阅脚本找到了答案。订阅1999年的主题后,对于下一个订阅,它开始出现错误:messaginging / too-many-topics。
因此阈值为1999.
只要选择的答案是正确的,我就在这里发布一个绝对的答案。
Google Firebase云消息传递
Some things to keep in mind about topics:
-
Topic messaging supports unlimited subscriptions for each topic.
However, FCM enforces limits in these areas: -
One app instance can be subscribed to no more than 2000 topics.
-
If you are using batch import to subscribe app instances, each request is limited to 1000 app instances.
-
The frequency of new subscriptions is rate-limited per project. If you send too many subscription requests in a short period of time, FCM servers will respond with a 429 RESOURCE_EXHAUSTED ("quota exceeded") response. Retry with exponential backoff.