Strange PEP behavior!?

Hi,

I want to publish something using PEP (XEP-163).

E.g. User “111” publishes:

AC/DC

User “222” is offline. When he comes online (with resource “test”), he receives TWO (!!) messages (which are slightly different though):

AC/DC

<item id=“05fbd9e5-0f94-43a9-8ef4-839b5bf640ee12” node=“http://jabber.org/protocol/tune>

AC/DC

I don’t think this is normal behavior, I can’t find anything in the specification.

And on the other hand, if the user is online, he will only receive one message.

Comments?

I will take a guess, but I think you are getting one from offline storage and the other from the actual pubsub node when the user subscribes.

By default, the pubsub node will publish the last item on a new subscription, thus that will include a delay element as well.

Not trying to say that this should happen, but that would be my starting point.

So, do you think this is a bug? For me, it feels like one.

The pubsub node probably creates and sends the message and some other logic will put it into the offline storage!?

And when the user comes online, two messages are sent, one from the offline storage, one from the PEP service.

If it is a bug, can somebody create a Jira issue?

Not sure about the offline part, but I didn’t think that pubsub was supposed to get stored there, but I haven’t looked at that code in a while so I am not sure. That would be the error though, as PEP is supposed to publish the last item for each new subscription or to each newly available resource for a subscription.

Just saw this: http://xmpp.org/extensions/xep-0060.html#impl-offline

Appearently a node can be configured like this:


normal
headline
headline

Openfire doesn’t support the version of the spec in which this was introduced, so I don’t think this option is available.

On the other hand, you can also configure your node with this option, which should also handle your problem.

true

There appears to be some overlap between these two options, but at least this one is already supported.