[jdev] subscriber to receive all un-received items
Jonathan Dickinson
jonathan at dickinsons.co.za
Thu Apr 14 07:50:20 UTC 2011
________________________________
> Date: Thu, 14 Apr 2011 15:42:47 +0800
> From: breathing at gmail.com
> To: jdev at jabber.org
> Subject: [jdev] subscriber to receive all un-received items
>
> Hi guys,
>
> I am playing with the pubsub feature of xmpp. I configure a node to be
> persistent with a max item number 20. I realized the subscriber only
> receives the last item in the node when it gets online. it does not go
> retrieve previous un-received items. i am not sure if there is a way to
> configure the node/subscriber to retrieve all un-received items .
>
> Thanks,
>
> James
See 6.5.2 of XEP-0060 (http://xmpp.org/extensions/xep-0060.html).
Typically when your client subscribes to something this is the order you take:
1. Make the subscription.
2. Ask the server for the items.
You must do it in that order. If you do not, items may be published between the two steps (and you would miss them). You can filter out duplicated by using the item @id attribute.
-- Jonathan Dickinson
More information about the JDev
mailing list