Reputation: 5984
There is a following note inside firebase documentation regarding stored messages:-
There is a limit of 100 messages that can be stored without collapsing. If the limit is reached, all stored messages are discarded. When the device is back online, it receives a special message indicating that the limit was reached. The app can then handle the situation properly, typically by requesting a full sync from the app server.
What will be the type of the special message? Ie can it be handled via onMessageReceived?
Does this mean that at a point i can have a total of 100 undelivered messages in total ?
Or does it mean that at a point i can have 100 undelivered messages per user?
Does this limit apply to data notifications sent to topics, if so how will it work? I can have users subscribed to more than a hundred topics with multiple users of this kind ... Will their notifications get discarded if they are offline when the messages are sent?
Can anyone please clarify what this means.
Upvotes: 1
Views: 954
Reputation: 12717
If you send more than 100 messages while the device is offline, when the device is back online it will receive a special message.
The special message will trigger FirebaseMessagingService.html#onDeletedMessages()
:
https://firebase.google.com/docs/reference/android/com/google/firebase/messaging/FirebaseMessagingService.html#onDeletedMessages()
At a point you can have max 100 messages undelivered PER USER.
Upvotes: 3