My usecase: A user logged into my app, should be able to send messages to himself logged into the app on another Android device. If the user has more than one devices, then once he opens the message, the notification on other devices must disappear.
Doubts:
How to send data to a particular user across devices? I understand how to send messages to different users on different devices using GCM but this seems rather confusing.
How to achieve this in MQTT with adequate security? I read as much as I could about the security and got to the conclusion that MQTT isn't in the charge of it and that I've to implement my own security measures at the broker level. As of now Mosquitto broker allows username/password authentication, but for an app implementing Oauth, username/password seems rather vulnerable.
Or should I move over to XMPP?
You can use the new User Notifications feature of GCM.