title: How does ejabberd saves offline chat into spool table
body: <p>I have used ejabberd open source server to implement my chatting application. It has been successful in delivering and receiving messages, but sometimes delivery acknowledgements and read acknowledgements are getting lost.</p>
  
  <p>If the connection close session stanza is send by the client to ejabberd server, then further messages are for sure stored in spool table. Consider a scenario that there was problem in client network, and client got disconnected without sending close session stanza to server. Server assumes client is still online and doesn't store messages into spool table. </p>
  
  <p>But when client comes online, all the pending messages are delivered to client (spool plus that some messages when server thought client is online).</p>
  
  <p>Where does ejabberd stores offline messages instead of spool table?</p>