I've built a functioning C2DM app and generally it works very well, and the push messages arrive fast. However I find that fairly regularly when I first start the app or bring it back to focus, messages do not arrive.
They are definitely sent successfully (I get a 200 response) and the message format is certainly right (sending the same message later works fine). The failure can last for a small number of minutes, and then suddenly it starts working again, and works consistently thereafter.
However even after it starts working, the older messages have apparently disappeared and never arrive. The messages are definitely not arriving - I have extensive logging that highlights any C2DM messages that arrive.
I'm fully aware that C2DM will never guarantee delivery, so I expect some messages will fail, but in my experience, on some occasions, it just doesn't work. I obviously want to understand if that is something I am doing wrong in my app, or the C2DM service itself.
What could cause C2DM to fail to deliver messages? If messages cannot be delivered, why is the C2DM server not trying again from its queue? Related - should I get a new Registration ID only when the app starts the first time, or refresh it each time the app starts? I currently do the latter (in the Application, not an Activity).