I am looking into incorporating Google Cloud Messaging into my app. I would like to send messages to all devices associated with a user. At first, it looked like GCM's device group messaging would be the way to go. But that requires managing registration IDs and notification keys on my server. It seems like it'd be easier to use GCM's topic messaging where the topic is keyed on some shared user information like a user ID.
I intend to use GCM to send data to both Android and iOS apps. I will be sending both background "content available" (to use the Apple Push Notification terminology) messages and user-visible notifications.
What advantages are there, if any, of device group messaging over topic messaging?
Based on the publish/subscribe model, FCM topic messaging allows you to send a message to multiple devices that have opted in to a particular topic. You compose topic messages as needed, and FCM handles routing and delivering the message reliably to the right devices.
FCM is the new version of GCM under the Firebase brand. It inherits GCM's core infrastructure to make sure we continue to deliver messages reliably on Android, iOS and Chrome. Save this answer.
The GCM server and client APIs were removed on May 29, 2019, and currently any calls to those APIs can be expected to fail. Google Cloud Messaging, deprecated April 10 2018, has been deactivated and removed from Google's APIs.
Originally Answered: Does what'sapp using GCM to exchange messages? No. Whatsapp is built using jabber server, which implements XMPP communication protocol.
I think the first point below is the only thing that makes any difference
https://firebase.google.com/docs/cloud-messaging/android/topic-messaging
- Topic messages are optimized for throughput rather than latency. For fast, secure delivery to single devices or small groups of devices, target messages to registration tokens, not topics.
- If you need to send messages to multiple devices per user, consider device group messaging for those use cases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With