Question

I have started working on a GCM (Google Cloud Messaging) app and I am already facing a very basic problem. I want to split my application into different environments (DEV, CI, UAT, PROD, DR) so that my DEV team can use the DEV XMPP servers (one per developer locally) to test the app and not stumble on each other; The same applies for my UAT team and the PROD and DR server. Thus, I would like different environments to have their own XMPP servers that handle GCM messages without interfering with one another. Unfortunately, it seems that I am not able to do that as when I create a new project with Google Developers Console I only get one unique project number per project that I can use within my app to send messages to. Thus, whenever I send a message from the app to that project number (i.e. backend XMPP server through GCM), if I have multiple backend servers the message will get delivered to just one server at random, as all the servers login using that same unique project number and all apps are using that single unique project number to send messages to.

How does one go about addressing this issue? I want to be able to forward the client's message to the right server (DEV, CI, UAT, PROD, DR) so that my test messages don't get processed on the live server etc. Should I create multiple projects within Google Developers Console and add a suffix environment or something so that I get multiple project numbers and use one per environment? Or is there another way?

Thank you for your time.

Was it helpful?

Solution

Each Google API Project has a single project number. Therefore your only option is to create a different project for each of your environments. You'll have to get all of those projects white-listed for them to work with GCM CCS.

OTHER TIPS

Also note the following from http://developer.android.com/google/gcm/ccs.html:

The CCS XMPP endpoint runs at gcm.googleapis.com:5235. When testing functionality (with non-production users), you should instead connect to gcm-staging.googleapis.com:5236 (note the different port). Testing on staging (a smaller environment where the latest CCS builds run) is beneficial both for isolating real users from test code, as well as for early detection of unexpected behavior changes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top