fengweili
fengweili

Reputation: 53

How to fetch offline message from pubsub node in smack

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

Answers (1)

Robin
Robin

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

Related Questions