If a user has multiple subscriptions to the same pubsub node with different full JIDs (user1@domain/foo and user1@domain/bar) each client will receive multiple event/item notifications. It appears as if openfire is just sending the item notifications out based on a matching bare JID which causes duplicate notifications to be sent to clients that dont have a matching resource id. This increases with number of different resource IDs a user has logged in and subscribed with.
Why is this a problem? What if a client application appends a timestamp to the resouce ID so it is unique on every login. The number of event notifications will be compounded and increase by one after every login.
Here is the section of the XEP I’m referring to: http://xmpp.org/extensions/xep-0060.html#subscriber-subscribe-multi
Specifically this statement: “; however, if the same bare JID has multiple subscriptions but those subscriptions are for different full JIDs (e.g., one subscription for firstname.lastname@example.org./foo and another subscription for email@example.com/bar), the service MUST treat those as separate JIDs for the purpose of generating event notifications.”
How to test this:
Create a pubsub node.
Subscribe to the node as user1@domain/foo.
Subscribe to the node as user1@domain/bar.
Login as client user1@domain/foo.
Publish an item on the node and notice you get two notifications under the client user1@domain/foo.
Is this a bug in openfire or am I understanding the spec wrong?