Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.
lahirumaramba
commented
Jun 23, 2026
@chong-shao@Doris-Ge any thoughts on removing this limit? |
Doris-Ge
commented
Jun 25, 2026
@lahirumaramba Our team has no objection to removing this limit. |
ezhilnn
commented
Jun 28, 2026
@lahirumaramba@Doris-Ge can some one approve this |
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: ezhilnn <ezhilnaga4732@gmail.com>
ezhilnn
commented
Jun 30, 2026
@lahirumaramba@Doris-Ge@jamesdaniels@amarkevich can someone approve this |
ezhilnn
commented
Jul 3, 2026
@lahirumaramba someone approve this ! |
ezhilnn
commented
Jul 3, 2026
@Doris-Ge can you approve this ! |
ezhilnn
commented
Jul 6, 2026
@lahirumaramba waiting for your approval to merge this ! |
lahirumaramba
commented
Jul 7, 2026
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. |
ezhilnn
commented
Jul 7, 2026
Do you want my help in any other sdk ? @lahirumaramba |
ezhilnn
commented
Jul 21, 2026
@lahirumaramba Can we merge this now? |
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