I want to send an alert notification when overall organisation Async Apex Execution limit reached 70% of total limit. Say if limit is 2500 and if system already exhausted 1750 of daily Async Apex Limit out of 2500 then any alert should be send to few persons notifying that your organisation limit of Async Apex Executions have reached 70% threshold.
Related
I am looking for max allowed active connections to Firebase Realtime DB in Blaze Plan for below
How many active RtDB listeners (StreamSubscription) from single device
How many active RtDB listeners (StreamSubscription) to single db from all connected devices
In below link I see,
total Simultaneous connections allowed are 200,000
https://firebase.google.com/docs/database/usage/limits
(A simultaneous connection is equivalent to one mobile device, browser tab, or server app connected to the database.)
But I could not find StreamSubscription limit per device, and StreamSubscription limit per db.
I am running a cronjob every evening to send notifications to a set of users in my database, call them 1-100. However, recently with an increase in my users, it's taking longer and longer for this job to run. Is there a way to have the pub/sub topic trigger multiple jobs, say triggering one job to handle users 1-50, and another to handle users 51-100?
Sure, just partition your users according to some bucketing scheme (maybe modulo their UID), create more pubsub topics and functions for those partitions, and send messages to those topics for each of the the partitions of users that you want to process. So, in your main scheduled function, just send messages to each pubsub topic partition, and let the delegate functions do their work.
Also, if your haven't already, consider increasing the timeout for the main function in case it just needs more time to finish processes. The max timeout for a Cloud Functions background trigger is 9 minutes.
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.
As mentioned in FCM documents, unlimited topic can be created for one Firebase application. But as the Firebase Admin SDK document: explains an error:
messaging/too-many-topics:- A registration token has been subscribed to the maximum number of topics and cannot be subscribed to any more.
I was not able to find this threshold value of maximum number of topics. Can anybody explain, what is the limit? How many topics an app instance can subscribe to in FCM?
I found the answer by running a subscription script for an app instance. After subscribing to 1999 topics, for the next subscription it started giving error: messaging/too-many-topics.
So the threshold value is 1999.
As much as the selected answer is correct, I'll like to post an absolute answer here.
Google Firebase Cloud Messaging
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.
I want to use Firebase notification for my android application and what i want to know is that is there any limitation for number of topics ? or for the number of users that can subscribe a topic ?
For example can i have 10000 topics with 1 million users for each of them ?
There is no limitation on the number of topics or subscriptions. There was a limitation of 1 million subscriptions for the first year after topics was initially launched but that restriction was removed at this year's (2016) Google I/O. FCM now supports unlimited topics and subscribers per app. See the docs for confirmation.
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.
Check this
https://firebase.google.com/docs/cloud-messaging/android/topic-messaging