There was a problem hiding this comment.
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.
Sorry, something went wrong.
|
@chong-shao @Doris-Ge any thoughts on removing this limit? |
Sorry, something went wrong.
|
@lahirumaramba Our team has no objection to removing this limit. |
Sorry, something went wrong.
|
@lahirumaramba @Doris-Ge can some one approve this |
Sorry, something went wrong.
|
@lahirumaramba @Doris-Ge @jamesdaniels @amarkevich can someone approve this |
Sorry, something went wrong.
|
@lahirumaramba waiting for your approval to merge this ! |
Sorry, something went wrong.
|
Thanks @ezhilnn , if we make this change for Java it should also be applied across other Admin SDK languages for consistency. I am checking with the team to follow the correct process for changes across the SDKs. I will share any updates here. Thank you for your patience. |
Sorry, something went wrong.
|
Do you want my help in any other sdk ? @lahirumaramba |
Sorry, something went wrong.
Fixes #1103
#1103
Problem
sendEach makes an individual HTTP call per message, unlike the
deprecated sendAll which used a single HTTP batch request limited
by Google's batch API. The 500-message cap was copied from sendAll
where it was technically justified — but has no basis in sendEach.
Changes
callers to chunk very large lists to avoid FCM server-side rate limiting
Testing