Eylen
Eylen

Reputation: 2677

Android GCM topic subscription limit

With the introduction of topics in android gcm I was evaluating this option to easen the work that should be done to mantain in sync our server with some subscriptions.

However I have read in the documentation that the use of topics is limited to 1 million subscriptions. Does this mean that you can't have more than one million users (with one or more topics) or that you can only have 1 million topics subscribed (for example 100.000 users subscribed to 10 topics each) ?

Upvotes: 3

Views: 4249

Answers (5)

Nil
Nil

Reputation: 195

Topic messaging supports unlimited topics and subscriptions for each app.

Check This [FCM Notifications][1]https://firebase.google.com/docs/cloud-messaging/android/topic-messaging

Upvotes: 0

Tarek El-Mallah
Tarek El-Mallah

Reputation: 4115

GCM now removed the limit, check this: https://developers.google.com/cloud-messaging/topic-messaging

Also Firebase Cloud Messaging (FCM) the same. https://firebase.google.com/docs/cloud-messaging/android/topic-messaging

GCM topic messaging allows your app server to send a message to multiple devices that have opted in to a particular topic. Based on the publish/subscribe model, topic messaging supports unlimited subscriptions per app. The app server sends messages with payloads up to 2KB to the topic, and GCM handles the message routing and delivers the message reliably to the right devices. For example, users of a weather forecasting app could opt in to a "severe weather alerts" topic and receive notifications of storms threatening specified areas.

Upvotes: 0

Elad Nava
Elad Nava

Reputation: 7906

You could try to work around this limit by using multiple SENDER_IDs when registering devices.

Since the 1 million subscriptions limit is enforced application-wide, I'm pretty sure that Google's way of tracking that is via the SENDER_ID.

And then, on the server-side, you'd have to issue multiple publish requests to GCM (each time with a different Server API Key, to support more than 1 million devices).

I'm going to test this theory out and let you know what I find. The worst-case scenario is that it is enforced via the application's package name (com.example.package), and then there is no elegant workaround.

Update: The limit has now been removed!

We’re now happy to announce that we’re allowing unlimited free topics for your app. This means app developers can place an unlimited number of devices within each topic and create an unlimited number of topics.

http://googledevelopers.blogspot.co.il/2015/12/google-cloud-messaging-weve-come-long.html?utm_source=Android+Weekly&utm_campaign=1cb848077c-Android_Weekly_184&utm_medium=email&utm_term=0_4eb677ad19-1cb848077c-337844217

Upvotes: 0

Simon
Simon

Reputation: 19938

I think the limit has now been scrapped:

GCM topic messaging allows your app server to send a message to multiple devices that have opted in to a particular topic. Based on the publish/subscribe model, topic messaging supports unlimited subscriptions per app.

https://developers.google.com/cloud-messaging/topic-messaging

Upvotes: 5

Koh
Koh

Reputation: 1570

It's a limit on subscriptions in your app in total, across all topics created within your app.

You will get a TOO_MANY_SUBSCRIBERS error when the number of subscriptions per app exceeds the 1 million limit.

Upvotes: 7

Related Questions