First, was node configured to deliver messages to offline subscribers? If not, then they are not.
Is your server offline? Pubsub messages should not be different from any other offline message, so there is nothing special about how to receive them.
If you just want to receive messages that are in node and node is persistent, you can receive messages directly from node using
myLeafNode.getItems();
Robin source
share