3
votes

I am using the smack library in my android project to create a instant messenger. Using a MessageListener to receive the messages and a ChatManager to send the messages, I get the offline messages in the wrong order. On my Server I have Openfire installed.

For instance a online user sends 3 seperate messages "A", "B" and "C" to an offline User. When this offline User then comes online the message are not received in the right order. He will get displayed "C", "B" and "A". Why is this so? And how can this issue be resolved?

Thank you in advance for any help.

1

1 Answers

3
votes

This seems to be an Openfire bug or misconfiguration. XMPP messages should be delivered in order:

An XMPP server MUST ensure in-order processing of the stanzas and other XML elements it receives over a given input stream from a connected client or remote server.

In-order processing applies (a) to any XML elements used to negotiate and manage XML streams, and (b) to all uses of XML stanzas, [...]

-- RFC6120 Section 10.1

Offline messages are not explicitly mentioned, but they are just a server feature and not documented in the protocol. However there is no exception for them either - servers should still follow these rules.

I recommend posting to the Openfire forum or filing a bug report.