Would you say it's a correct description of Matrix to call it "Jabber/XMP without the whole XML mess and over HTTP"?
Why would you need to do that? Why not just give every message a timestamp, make sure they get sent, and sort the messages on the receiver side? If you're really concerned about message order, you could give every message a unique id, and send out the id of the previous message with every message, and improve your sort function accordingly.
https://matrix.org/docs/guides/faq.html#what-is-the-differen...
Disclaimer: I prefer XMPP.