I am using openfire server(4.0.3) and xmpp client with strophe.js and BOSH.
Monitoring plugin(1.5.4.2) is used for message archive management.
I am able to get whatever message I request using mam plugin (all messages with JID/last message with JID/last 10 messages with JID) But the order of message is incorrect sometimes.
This is observed mostly in case of offline messages.
(X user is sending a messages to user Y and user Y is not logged in from anywhere)