I am using XMPP pubsub.Everything is working fine.User can create node and interested user can subscribe to that node.But I want to store the publish action into DB.Because in my application many things are handled by pubsub like chat,feeds etc so on page refresh I want to persist chat.So I m looking for any openfire plugin which saves it into DB behind the scenes. Like openfire saves chat in case of MUC (Multiple User Chat).I dont want to manually send ajax request. So is there any way to log the publish items.

Update:

There was a problem in my form configuration in which persist items was set to false by default.So I configured the node as you suggested.But again I am facing some problem on page refresh.I will explain you with an example. In my application user A logs in and create a node and on successful creation it sends request to user B, now user B subscribe to the node created by user A.Now if any user does a page refresh I send an IQ stanza of type get to get all the missed events like the one you mentioned above.But I am getting error 400 subid-required.

So can help me where I am getting wrong.Also I read the link http://xmpp.org/extensions/xep-0060.html#owner-configure point : 6.5.9.1 which says
If the requesting entity has multiple subscriptions to the node but does not specify a subscription ID, the service MUST return a error to the subscriber.So does it mean that I am subscribing to the same node again?
I checked if thats the case but I am subscribing only once.So just figuring out where things are getting wrong.

If your intent is to persist all items, then omit the max_items attribute altogether instead of setting it to an arbitrarily large value. Same for item_expire. This also assumes of course that the server has implemented the more recent version of the spec that has the expire attribute.
–
RobinOct 6 '10 at 16:14