Does Firebase Cloud Messaging have an option to limit maximum no. of notifications sent per user per day? - firebase

We use FCM to send app notifications. Basically, we want to put a cap on maximum number of notifications that an app user can get in a day. Does FCM have an option where on hitting the cap, the subsequent messages are discarded by FCM and not sent to the user?

FCM is a free service which currently doesn't have any limitations whatsoever when it comes to the count of notifications sent and received.
If you want to enforce a limit of some sort, you would have to enforce this on your implementation (probably server side), by preventing further messages when a specific range is hit.
In general, push notification features are good for letting users know of specific (non-critical) information. I don't get why anyone would limit something when it's already free of use -- unless there's some different cost you're limiting which is directly affected by the push notif service.

Related

Flutter FCM Topic named like a document

I am new to firebase cloud messaging and i search the best way to send notifications to clients.
I want people to be able to subscribe to new entry in subcollection like this :
books/{bookID}/comments/{commentId}/reply/{replyId}}
Is that bad if i use that kind of syntax?
so i can push notification on that topic when new reply are created
void fcmSubscribe(String bookId,String commentId) {
firebaseMessaging.subscribeToTopic('book-${bookiD}_comment-${commentId}');
}
or i need to use Individual Device Notifications and create entries like this
books/{bookID}/comments/{commentId}/notifications/{tokenId}}
i want to avoid firestore Read and Write.
You can use whatever valid topic names that you want. Use whatever you like - it's your choice. There is nothing particularly "bad" about your choice of name, as long as it works for you. Things can only go badly for you if you exceed one of the documented limits for topic messaging:
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.
If you're thinking that FCM is tied in any way to Firestore, that's not the case. You are not obliged to make anything match between your Firesore documents and your FCM topics.

How to send a push notification from the Firebase console to a specific GCM/FCM device token ID

In Urban Airship, when I am composing a notification, I can target specific users by searching for a Urban Airship channel_id (device ID):
I sent from Urban Airship the push notification that I am showing above, and I received it successfully. Now I want to do the same thing, send a push notification to a specific device, but now using the Firebase console. The problem is that in Firebase, in the step where I need to specify the target, it only allows me to choose User segment or topic. I was expecting to see a third option: Target specific users (for sending notifications to one or many specific GCM/FCM device token IDs. So my alternative is to add a GCM/FCM device token ID to a topic and then send the push notification to that topic, which is something that I have successfully done before. Nonetheless, that would be a workaround and not the way I would prefer to do this. Is it possible to send push notifications to specific users (by defining the target GCM/FCM device token IDs) from the Firebase console? Thank you.
UPDATE 1: See how the Firebase console (https://console.firebase.google.com/) only shows User segment and Topic as the Target:
First Step:
Second Step:
Third Step:
By design, the notification feature in the console is for sending out broadcast-type events. Sending user-specific alerts would be more of a programmatic operation done through the API.
For sending test messages, there is a console tool for this, explained here.
Note that it is possible to send a notification to one device by subscribing a device to any topic and sending the notification to that topic in the console (keep in mind topics are public and you can't prevent users from signing up to them; fine for testing most likely).
Another alternative is to send a message via HTTP or curl. Perhaps the best resource for this is the quickstart/messaging example.

Firebase console TPS handling of push notification

I have 1 million user base, so if I'm sending push notification through firebase console my active users get increases drastically which causing some trouble at server end for few time. So I have two questions regarding that -
What is the transaction limit(TPS) of firebase for sending notification.
Can I tune transaction limit(TPS) of firebase console according to my requirement?
There isn't any limit to sending notifications with FCM. Although if you are using topics, and you're sending too many messages at a time to a single topic, you might receive the Topics Message Rate Exceeded error from time to time, in which case you could just implement an exponential backoff.
So to answer your questions:
There isn't any.
I'm not sure what you mean by this. The console contains the data about your Firebase project and some features related to interacting with your app (like the Notifications Console), that's about what it could do.

Microsoft Push Notification Service capacity

Does anybody know the limits of using the MPNS? I need to know specifically if I can send to MPNS millions of notifications to unique devices (if I ever had) almost all at once (seconds) and how will the MPNS handle it? is it no problem? will MPNS handle the notifications as soon as it can? would the MPNS block my service?
Thanks
The only limit I saw mentioned on MSDN is this :
Authenticated web
services do not have a daily limit on the number of push notifications
they can send. Unauthenticated web services, on the other hand, are
throttled at a rate of 500 push notifications per subscription per
day. For more info, see Setting up an authenticated web service to
send push notifications for Windows Phone.
It's a limit per device per day, and it exists only if you don't setup an authenticated web service.
They don't mention a limit on the number of unique devices.

Microsoft push notification service pricing

I've read Microsoft documentation about Push Notification Service that they are offering for Windows phones but there is no information about pricing. I've read somewhere that it is free to use max 500 notification per day/per application/per device and it is unauthenticated mode but there is also authenticated mode which has no daily limit and cost some money. Is that true and if it is, how much is price?
Also I am interested in information about saving messages in server if user is not active in time of sending. How much push messages can Microsoft Push Service save for one device/user before starts to discard it?
It is free, authenticated or not.
Not sure if they actually store messages on the server to be delivered. When you send one they will give you the clients connection status as part of the response.

Resources