Quantcast
Channel: Ignite Realtime : Unanswered Discussions - Support
Viewing all articles
Browse latest Browse all 4979

Not getting all items from node

$
0
0

Hi, when retrieving persistent items from a node, does it only return the latest published items for each user? Right now, when I try to call getItems, I seem to only get the latest published event from each user. I would like to retrieve all of the items from the node, regardless if there's more than one for each user.

 

This is the code I'm using currently for retrieval:

PubSubManager manager = new PubSubManager(connectionManager.getConnection());            node = manager.getNode(nodeList);            Collection<PayloadItem<EventItem>> eventItems = node.getItems(25);            Log.e(TAG, "Collection size: " + eventItems.size());            List<PayloadItem<EventItem>> payloadList = new ArrayList<>();            for(PayloadItem<EventItem> payload : eventItems) {                eventItemList.add(payload.getPayload());            }        } catch (SmackException.NoResponseException e) {            e.printStackTrace();

 

 

This is my node configure form:

ConfigureForm configureForm = new ConfigureForm(DataForm.Type.submit);        configureForm.setAccessModel(AccessModel.open);        configureForm.setDeliverPayloads(true);        configureForm.setNotifyRetract(true);        configureForm.setPersistentItems(true);        configureForm.setPublishModel(PublishModel.open);

 

 

If I submit two items to a node and then call getItems, the debug shows that I only receive the following;

<?xml version="1.0" encoding="UTF-8"?><iq to="pubsub.example.com" id="4cw4Z-27" type="get">   <pubsub xmlns="http://jabber.org/protocol/pubsub">   <items node="TESTNODE" max_items="25" />   </pubsub></iq><?xml version="1.0" encoding="UTF-8"?><iq from="pubsub.example.com" to="afa@example.com/Smack" id="4cw4Z-27" type="result">   <pubsub xmlns="http://jabber.org/protocol/pubsub">      <items node="TESTNODE">         <item id="bool@example.com/Smack">            <newevent xmlns="http://jabber.org/protocol/newevent" xml:lang="en">               <sender>bool@example.com</sender>               <title>Test Title 2</title>               <description>Test description</description>            </newevent>         </item>      </items>   </pubs
ub></iq>

 

This is the only thing I receive in the debug. No other items present except for the latest published one.

Is this a server setting issue?

I appreciate any advice or suggestions.

Thanks!


Viewing all articles
Browse latest Browse all 4979

Trending Articles