Firebase HTTP v1 API and no batch send anymore?

3,329 views
Skip to first unread message

M. Sneider

unread,
Jun 27, 2023, 5:56:43 AM6/27/23
to Firebase Google Group
0

I received an email from Google informing me that the following service is being decommissioned:

"Including multiple send requests in a single HTTP request to FCM known as Batch Send."

The recommended approach is to:

"Send messages via the HTTP v1 API, which has been optimized for fanout performance."

On this page:

https://firebase.google.com/support/faq#fcm-23-deprecation

it is mentioned that:

https://fcm.googleapis.com/batch

"Requests to the endpoint will start failing after 6/21/2024."

The recommended action is to:

"Migrate to the standard HTTP v1 API send method, which supports HTTP/2 for multiplexing."

Now, I have a question regarding this matter.

Currently, I am sending FCM messages using PHP and cURL via fcm.googleapis.com/batch. Since this will no longer work next year, I have already discontinued this method and now I have put the message sending process in a foreach (while) loop. This means that if, for example, I send 400 FCM messages, I will trigger or contact the following URL 400 times in succession / row:

https://fcm.googleapis.com/v1/projects/my-app/messages:send

Is this the intended behavior and not a problem? My project already uses HTTP/2. I'm just wondering if this is the correct approach, as I can't imagine that it is better than sending in batches or all at once. Thank you for clarifying.

Please let me know if you need any further assistance.

Arthur Thompson

unread,
Jun 29, 2023, 7:50:31 PM6/29/23
to fireba...@googlegroups.com
Hi,

Your updated approach is the intended behavior. 

If you are using HTTP/2 you should be able to optimize those requests for example: concurrently send requests and receive responses, but for 400 requests you will receive 400 responses. You can also consider using topics (if these messages are not private) to limit the number of requests sent from your end.

Arthur.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/987ab94d-7a53-4684-844d-233a1e16302fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages