-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate sendAll and sendMulticast #2094
Conversation
Doris-Ge
commented
Mar 3, 2023
- Deprecate sendAll and sendMulticast
- Add dummy implementation for sendEach and sendEachForMulticast to avoid errors reported by api-extractor
1. Deprecate sendAll and sendMulticast 2. Add dummy implementation for sendEach and sendEachForMulticast to avoid errors reported by api-extractor
Thanks, @Doris-Ge ! |
Got it! I was trying to keep a PR smaller. Sorry about that! |
…nd (#2138) * Deprecate sendAll and sendMulticast (#2094) 1. Deprecate sendAll and sendMulticast 2. Add dummy implementation for sendEach and sendEachForMulticast to avoid errors reported by api-extractor * Implement `sendEach` and `sendEachForMulticast` (#2097) `sendEach` vs `sendAll` 1. `sendEach` sends one HTTP request to V1 Send endpoint for each message in the array. `sendAll` sends only one HTTP request to V1 Batch Send endpoint to send all messages in the array. 2. `sendEach` calls `Promise.allSettled` to wait for all `httpClient.send` calls to complete and construct a `BatchResponse`. An `httpClient.send` call to V1 Send endpoint either completes with a success or throws an error. So if an error is thrown out, the error will be caught in `sendEach` and turned into a `SendResponse` with an error. Therefore, unlike `sendAll`, `sendEach` does not always throw an error for a total failure. It can also return a `BatchResponse` with only errors in it. `sendEachForMulticast` calls `sendEach` under the hood. * Add integration tests for `sendEach` and `sendMulticast` (#2130) * Avoid using "-- i.e." in the function comment
Why were sendAll and sendMulticast deprecated (#2094) and sendEach and sendEachForMulticast introduced (#2097)? Is there a deprecation schedule for sendAll and sendMulticast? Will they be removed from a future version of the SDK or disabled on the server side? I tried searching online, including the Firebase docs and SDKs for other languages but having trouble to find any more information about this change. Would appreciate any guidance about this change. Thank you. |
Same here. From #2097:
Is this the only reason for the deprecation? As I catch and handle any errors anyway, regardless of using Especially as per the
Is there some other context for this decision? Why should we use |
Ah I see there's just been an announcement that the See here:
And technical info here:
|