Reputation: 53
I am using smack. How Do I fetch an offline message from a pubsub node? I tried using OfflineMessageManager to fetch the message, but it did not work.
Upvotes: 3
Views: 1190
Reputation: 24262
First of all, was the node configured to deliver messages to offline subscribers? If not there are none to retrieve.
Does your server have offline messages turned on? The pubsub messages should be no different than any other offline message, so there is nothing special about how to retrieve them.
If you simply want to get the messages that are in the node, and the node is persistent, you can get messages directly from the node by using
myLeafNode.getItems();
Upvotes: 1