XMPP duplicate message when presence=available

Hi there,

I’m using Java and the Smack library to talk to Openfire 3.10.2 on Windows 7.

I use 2 Java sessions connected to Openfire.

These 2 sessions use the same user but a different resource.

I then send a pubsub message to a particular node in session 1, expecting it to reach session 2 once.

However the second session sees two messages instead of one.

I did some investigation and found this only happens if I change the “presence” of the user on the second session to “available”.

Should “presence” change the messages in this way?

Thanks in advance,


PS the session which receives the two messages, each message is slightly different, as shown below.

One message has the “to” set to the full jid, the other has it set to the bare jid.

My application sees both messages.