If I understand correctly, Google Cloud Messaging can send only one message to 1000 different phones. But what if we need to increase this number to 1 million, maybe?
I tried to go through the documentation but found nothing.
If you need to send the same message to more than 1000 registration identifiers, you simply divide the sending process into groups of 1000 registration identifiers. Each group will be sent in a separate request to the GCM server.
FCM has replaced GCM, but still, if someone is looking for this answer, you can check this code from Google.
multicast messages
The idea is to create a queue Queue queue = QueueFactory.getQueue ("MulticastMessagesQueue");
and add 1000 device identifiers to this queue and publish the send message.
full implementation of server code server implementation of google io 2016 application