Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When should I use GCM device groups versus topics?

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?

like image 602
Joe Shaw Avatar asked Dec 01 '15 20:12

Joe Shaw


People also ask

What is topic messaging used for?

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.

What is difference between GCM and FCM?

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.

When was GCM deprecated?

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.

Does Whatsapp use GCM?

Originally Answered: Does what'sapp using GCM to exchange messages? No. Whatsapp is built using jabber server, which implements XMPP communication protocol.


1 Answers

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.
like image 82
Sreekanth Avatar answered Oct 21 '22 05:10

Sreekanth