fix: remove artificial 500 message limit from sendEach#1222
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the 500-message limit from the sendEach and sendEachForMulticast methods in FirebaseMessaging, updating Javadocs and tests accordingly. A critical issue was identified in the new unit test where calling FirebaseMessaging.getInstance() without initializing FirebaseApp throws an IllegalStateException that is silently caught, resulting in a false positive test. It is recommended to use a mock client to properly verify the behavior.
|
@chong-shao @Doris-Ge any thoughts on removing this limit? |
|
@lahirumaramba Our team has no objection to removing this limit. |
|
@lahirumaramba @Doris-Ge can some one approve this |
Signed-off-by: ezhilnn <ezhilnaga4732@gmail.com>
|
@lahirumaramba @Doris-Ge @jamesdaniels @amarkevich can someone approve this |
Fixes #1103
#1103
Problem
sendEachmakes an individual HTTP call per message, unlike thedeprecated
sendAllwhich used a single HTTP batch request limitedby Google's batch API. The 500-message cap was copied from
sendAllwhere it was technically justified — but has no basis in
sendEach.Changes
sendEachOpAsyncsendEachandsendEachAsyncmethods to advisecallers to chunk very large lists to avoid FCM server-side rate limiting
Testing