title: XMPP and retrieve delivered messages
body: <p>I'm developing an asynchronous turn-based game (like Angry Words or DrawSomething) for iOS and Android. I'd like to implement a chat section inside the game where the players could talk.</p>
  
  <p>I'd like the messages to be sent almost instantly so I'm considering to use XMPP, I have some questions about how to do it:</p>
  
  <ul>
  <li>Should I create a room per match and drop there the messages? or should I send them from a user to other with some kind of format (json for example) specifying the match id.</li>
  <li>Since the game can be used in more than one device. I'd need to log the messages in order to be able of recover the message history. What model should I follow?
  <ul>
  <li>Message from Alice -> Bot (bot logs the message) -> Bob</li>
  <li>Implement some kind of plugin/extension in the server to log in the messages</li>
  </ul></li>
  </ul>
  
  <p>Thanks</p>