Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any limitations for the FCM topics names?

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 of topic name or allowed characters.

like image 949
Todor Kostov Avatar asked Jan 22 '18 10:01

Todor Kostov


People also ask

Is there any limit for FCM?

You can send up to 240 messages/minute and 5,000 messages/hour to a single device.

What is topic in FCM?

Based on the publish/subscribe model, FCM topic messaging allows you to send a message to multiple devices that have opted in to a particular topic. You compose topic messages as needed, and FCM handles routing and delivering the message reliably to the right devices.

What is an FCM name?

Firebase Cloud Messaging (FCM), formerly called Google Cloud Messaging (GCM), is a free cloud service from Google that allows app developers to send notifications and messages to users across a variety of platforms, including Android, iOS and web applications.

Is FCM always free?

Firebase Cloud Messaging (FCM) provides a reliable and battery-efficient connection between your server and devices that allows you to deliver and receive messages and notifications on iOS, Android, and the web at no cost.


2 Answers

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)

like image 117
Peter Haddad Avatar answered Oct 11 '22 14:10

Peter Haddad


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.

like image 31
Phạm Hùng Avatar answered Oct 11 '22 14:10

Phạm Hùng