Skip to content
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

Support for sending batches of messages in API/v1 #114

Open
gersonazgo opened this issue Jun 20, 2023 · 2 comments
Open

Support for sending batches of messages in API/v1 #114

gersonazgo opened this issue Jun 20, 2023 · 2 comments

Comments

@gersonazgo
Copy link

Feature Request

Is your feature request related to a problem? Please describe.
I'm using the 'fcm' gem in my Rails project to send my push notifications via Firebase. The problem I'm encountering is that the gem does not currently support batch messages (API/v1, the legacy works perfect). This means that I have to send each message individually, which is quite inefficient

Describe the solution you'd like
According to the Firebase Documentation, the REST API and Admin SDKs support sending messages in batches of up to 500 messages. This feature allows developers to group messages together and send them in a single API call, providing significant performance improvement over sending individual HTTP requests for each message.

Describe alternatives you've considered
Without this feature, I'm forced to loop through each message and send it individually or build the batch logic myself — which I think should belong in this gem.

Thank you for your consideration.

@flivni
Copy link

flivni commented Aug 1, 2023

I'd like batch support as well. Any plans to implement?

If not, would you accept a PR that adds? For now, either:

Option (a) add a method called send_all_v1(messages)
Option (b) allow send_v1(...) to take either an individual message or an array of messages.

@JerakRus
Copy link

JerakRus commented Dec 6, 2023

It seems to me that the problem is not entirely relevant, this API will soon be deleted from Google and it will be necessary to think about how to switch to supporting a new one. https://firebase.google.com/support/faq?hl=ru#fcm-23-deprecation. If I understood everything correctly of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants