Skip to content

Send message to multiple devices #196

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

Closed
KoblStone opened this issue Aug 23, 2018 · 9 comments
Closed

Send message to multiple devices #196

KoblStone opened this issue Aug 23, 2018 · 9 comments

Comments

@KoblStone
Copy link

KoblStone commented Aug 23, 2018

I want to send notifications to specific users using tokens. firebase-admin can't send multiple tokens so I'm using:

for obj in queryset:
            token = obj.app_token
            message = messaging.Message(android=android_config, data=data, token=token)
            try:
                messaging.send(message=message, dry_run=False, app=default_app)
            except Exception as ex:
                print('Error %s' % ex)

But it seems that "FCM" is blocked due to the fact that I send a lot of requests per second. Because after that I can not get a notification for a while.
Can this be solved?

@google-oss-bot
Copy link

Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight.

@google-oss-bot
Copy link

Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information.

@hiranya911
Copy link
Contributor

I believe there's some on going work to support multicast messaging in the new FCM REST API. This will be supported once that is implemented (although I don't know what the exact timeline is).

@hiranya911
Copy link
Contributor

In the meantime, can you use topic messaging to implement your use case?

@KoblStone
Copy link
Author

No. The list is generated dynamically and I will need to create multiple topics

@chong-shao
Copy link

chong-shao commented Feb 5, 2019

Update: as mentioned in firebase/firebase-admin-node#315, we are working on a new batch-send API for Admin SDK.

@chong-shao chong-shao reopened this Feb 5, 2019
@chong-shao
Copy link

Further updates will be posted on firebase/firebase-admin-node#315

@aaugustin
Copy link

I believe this issue was fixed by #283 and can be closed.

@chong-shao
Copy link

Thanks for the reminder!

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

No branches or pull requests

6 participants