Are there any limitations for the FCM topics names?

前端 未结 2 613
闹比i
闹比i 2020-12-20 17:12

I\'m trying to find out if there are any limitations for the topic names for FCM. Managed to find info about the number of topics (no limitations), but nothing like length o

相关标签:
2条回答
  • 2020-12-20 17:28

    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.

    0 讨论(0)
  • 2020-12-20 17:30

    Yes, not all characters are allowed, having space between words is not allowed in topic names.

    From the docs:

    sending messages to a Firebase Cloud Messaging topic is very similar to sending messages to an individual device or to a user group. The app server sets the topic key in the message body with a value like yourTopic. Developers can choose any topic name that matches the regular expression: "[a-zA-Z0-9-_.~%]+"

    for more info check this: https://firebase.google.com/docs/cloud-messaging/android/topic-messaging (build request section)

    0 讨论(0)
提交回复
热议问题