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

v1 doesn't support send to multiple tokens anymore ( any workarounds beside pub/sub ? ) #126

Closed
takeda-ma opened this issue Sep 8, 2024 · 1 comment

Comments

@takeda-ma
Copy link

I am currently migrating from legacy http to v1 http, but I encounter this problem where v1 looks like it doesn't accept array of tokens to send to.

similar to this person
https://groups.google.com/g/firebase-talk/c/4GuTzvRT_10?pli=1

after researching a bit it seems like the better practice is to do a pub/sub
where I need to make each device subscribe to a specific topic,
and then just broadcast a single message that will target those who are subscribe to the topic.
But I believe this will change our system a bit because we now want to be able to store the data of users which are currently
subscribed to a specific topic. ( We could maybe do a dirty implementation of temporarily subscribing tokens -> send message -> then unsubscribe all of them,,, but I believe this is not what firebase want us to do... or am I wrong)

@takeda-ma
Copy link
Author

takeda-ma commented Sep 8, 2024

firebase suggest the following
for 1 million recipients -> it is better to fanout

for less than 1 million recipients or whatever is advantageous to migrate to fanout for you-> it is better to send request

source:https://firebase.google.com/support/faq#fcm-depr-multiple-tokens

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

1 participant