Search code examples
push-notificationgoogle-cloud-messagingapple-push-notificationspubnub

Bulk Device Subscription in PubNub


I'm looking for a method to send APNS/GCM push messages to many thousands of users. The pool of users is determined at run-time, and can change depending on the message being sent.

The current implementation I have is to subscribe each device token one-by-one to a particular channel in a multithreaded fashion, making a huge number of HTTP calls to the REST API.

Is there a better solution, it feels like there must be?


Solution

  • PubNub Mobile Push Gateway

    The PubNub mobile push channel registration API is not setup to do bulk registration. It is designed to handle individual devices registering for channels for push notifications. So the only way to register multiple (many thousand) devices is to loop through all the device tokens to register each one by one.