Non persistent xmpp connections

48 views
Skip to first unread message

Ruchita Goyal

unread,
May 26, 2015, 5:56:37 AM5/26/15
to andro...@googlegroups.com
Hi all,

We have been using XMPP to send push notifications to android devices using GCM and everything seems to be working fine.
But we are now moving to a new Data center where there is a requirement to keep a connection NON-persistent.
I guess GCM suggests that XMPP connection handling/closing should be left upto CCS, but what if XMPP connections are closed say every 10 mins from backend server side? Is there any issue with such an approach or any drawback like message loss?

Thanks in advance!
Ruchita

Francesco

unread,
May 26, 2015, 1:11:08 PM5/26/15
to andro...@googlegroups.com

It should work fine as long as the disconnect times don't last longer than 24 hours.
hth,
  f

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/f4a4cec6-bda9-4c7e-bbd1-cbaaf3639245%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sergey Mkhitaryan

unread,
May 26, 2015, 4:38:22 PM5/26/15
to andro...@googlegroups.com
Hi Ruchita,

Do you use XMPP to receive messages from devices or you only send server->device?

Ruchita Goyal

unread,
May 27, 2015, 2:00:49 AM5/27/15
to andro...@googlegroups.com
We do receive messages from devices, ie, we use XMPP for both, downstream and upstream messages.

Sergey Mkhitaryan

unread,
May 27, 2015, 2:50:29 PM5/27/15
to andro...@googlegroups.com
Be advised that in some cases it might take some time ( >10 min) for GCM to deliver all the upstream messages that arrived while your server was offline. As long as you're ok with that, reconnecting every dozen minutes or so shouldn't be a problem.

Costin Manolache

unread,
May 27, 2015, 5:27:38 PM5/27/15
to andro...@googlegroups.com
Can you explain what is the reason for closing every 10 min ? Do you have multiple machines making connections, and all
of them disconnect at the same time ? 

It is best to have multiple connections and overlap them - so at any point there is at least one connection, with few minutes
for transition. 

Costin

Ruchita Goyal

unread,
May 28, 2015, 6:23:21 AM5/28/15
to andro...@googlegroups.com
We are closing connections from server side because we are moving to a new data center and having persistent connections are being discouraged.
We open multiple connections to GCM and wont be closing all connections at once, but kind of rotating disconnect and connect. So ideally server shouldn't be totally offline at any moment.

Thanks,
Ruchita
Reply all
Reply to author
Forward
0 new messages