title: How to manage PubSub notifications send while offline in XMPP?
body: <p>How to get offline message in PubSub? Using the Smack library. after searching I found an answer which looks like this:</p>
  
  <pre><code>// Create a pubsub manager using an existing XMPPConnection
  PubSubManager mgr = PubSubManager.getInstanceFor(con);
  
  // Get the node
  LeafNode node = mgr.getNode("testNode");
  
  List&lt;? extends Item&gt; items = node.getItems(100);
  </code></pre>
  
  <p>But <code>node.getItems(100)</code> returns last 100 messages, which can be online and offline too. </p>
  
  <p>1) how to keep track of online and offline message in pubsub using smack?</p>
  
  <p>2) is it possible to get unread message count in pubsub using smack? if yes then how to achieve it?</p>
  
  <p>3) how to know that who(publisher) send this message in a node?</p>
  
  <p>I just went through the documentation of Smack and PubSub from <a href="http://download.igniterealtime.org/smack/docs/latest/documentation/extensions/pubsub.html" rel="noreferrer">here</a>
   and <a href="https://github.com/igniterealtime/Smack/blob/master/documentation/extensions/pubsub.md" rel="noreferrer">here</a> but didn't find the solutions related to my queries. So can anyone help me to solve this?</p>