We have a setup which is used to test the message throughput through a XMPP system. The system is feeding groupchat messages in high volume and receiving them and validates if all messages sent are received and properly handled by the XMPP system.
In order to test that messages are correctly exchanged we have established a set of 12 groupchat messages that are send repeatedly. In a little percentage of the cases messages are received out of order even though they are delivered in order to the Smack library from the Openfire server.
We interface with the Smack API creating a new MultiUserChat object and then adding a MessageListener in order to collect the received messages.
It should be possible to reproduce the bug sending messages very quickly through a connection.
One possibility to mitigate the problem, is adding a 100 ms delay in the simulated XMPP clients between message deliveries, but this is not our preferred solution.
After code review, we suspect some subtle rewriting of the synchronisation blocks would solve the issue.
My primary question is, is this assumed a realistic problem. it is offending the XMPP spec RFC 6120, but the context in our case is highly unrealistic.