powered by Jive Software

Presence based delivery not working as expected

The “presence_based_delivery” doesn’t work on openfire or am I missing something?

This is what I did:

  1. Node configuration

“pubsub#presence_based_delivery” = 1

“pubsub#deliver_payloads” = 1

“pubsub#persist_items” = 1

“pubsub#max_items” = -1 (for infinite)

  1. User1 subscribes to NodeA and goes offline.

  2. User2 who is subscribed to the NodeA publishes an item to it.

  3. User1 goes online but does not receive any notification of the published item.

User1 is not going to get messages that were sent when they were offline. The service will simply not send them at all to that user. If you want offline messages, then set the configuration to not do presence based delivery and make sure you have offline messages configured.

Thanks a lot for the enlightenment!

In Server Settings I configured the Offline Messages to store and removed the “presence_based_delivery” on nodes, but it still does not work.

No messages are forwarded to the “ofOffline” table.

Or should I install the “Message Archiving” plugin?

Sorry, but I haven’t actually dealt with offline messages so I can’t help you out much there.

If you want to retrieve the items that were published when you were offline, you could just get them from the pubsub service (since you have defined a persistent node). Of course this will get all of them, not just the ones since the last time the user was online.

I need this functionality very urgently because it is the core of my application for the notification of newly published items. If this does not work then I have to get all the items from all subscribed nodes and compare them to the previous state which is stored somewhere else (e.g. on the client). This adds a lot of traffic and computing for the clients.

So, it is a pity that it doesn’t work on openfire out of the box. I read that this works on ejabberd, so I’ll give it a try…

I really appreciate your help though and again thank you very much for the clarification on that issue!