I am using the FCM service by sending notification message from my server to certain users. Basically I am expecting to send messages to 50k users at a time. I read somewhere that there is a limit of 1000 messages and perhaps a topic subscription is around it.
The problem is that it is not the same group of users. I check do query on my database and then I get a list of users that meet criteria. The number of users that meet criteria is different everytime and it will be around 50k users on avg (out of 250l users).
Currently I do this in a loop
Message message = Message.builder().setAndroidConfig(AndroidConfig.builder().setTtl(3600 * 1000 * 24 * 7) // 7 days
.setPriority(AndroidConfig.Priority.HIGH)
.setNotification(AndroidNotification.builder().setTitle("Update News")
.setBody("A news impacting you has been published on the app")
.build()).putData("Type", "Location").build())
String response = FirebaseMessaging.getInstance().send(message);
Is there any way I can sent notifications to my 50k users?
Thank you
EDIT
The question is not duplicate as the limit of the user case I am mentioning is not covered in the potential duplicate questions. I am sending message to ONE device per ONE send. So there are 50k Sends. @Doug(from Google) answer below implies that there is no limit as opposed to what the other questions. Therefore I needed a clarification on the answer