I have a number of connections for the same user (same bare jid,automatically created resource identifier). Lets say:
All users subscribe to the same pubsub node (node.lezebre) and each user should get an notification event if an item is published or retracted. The best way to do this would be to create a temporary subscription (XEP-0060 12.4) using the full jid, but unfortunately openfire 3.8.2 does not support this feature, right?
So my idea was to create a subscription with a bare jid to that node having the assumption publishing to the bare jid would cause openfire to send notifications to all instances of this user.
<subscribe node='node.lezebre' firstname.lastname@example.org'/> <options> <x xmlns='jabber:x:data' type='submit'> <field var='FORM_TYPE' type='hidden'> <value>[http://jabber.org/protocol/pubsub#subscribe_options](http://jabber.org/protocol/pubsub#subscribe_options)</value> </field> <field var='pubsub#include_body'> <value>1</value> </field> <field var='pubsub#subscription_type'> <value>items</value> </field> </x> </options>
<subscription node="node.lezebre" jid="email@example.com" subid="Tg8Urhi3W04yknlyxNoxU8O0iEDVuFW830BuHwg3" subscription="subscribed"> <subscribe-options/> </subscription>
So both users are connected now and firstname.lastname@example.org/aaaaaa publishes an item to node:
<publish node='node.lezebre'> <item id='32c1f0461a7ac9164a838b53fdc42014'> <payload xmlns='...'>payload</payload> </item> </publish>
<items node="node.lezebre"> <item id="32c1f0461a7ac9164a838b53fdc42014"> </item> </items>
User email@example.com/aaaaaa gets this notification, but firstname.lastname@example.org/bbbbbb does not. Same is if email@example.com/bbbbbb publishes an item he gets this event, but firstname.lastname@example.org/aaaaaa does not. Am i doing something wrong or is this a bug?
If i subscribe both users to the node using the full jid it works perfectly, but as the resource identifier is completely random it creates more and more subscriptions in the database that never will be deleted again. So that’s not a good idea.
Can anybody please help me on this?