其他分享
首页 > 其他分享> > android-Openfire离线消息顺序错误

android-Openfire离线消息顺序错误

作者:互联网

我在我的android项目中使用smack库来创建即时通讯程序.使用MessageListener接收消息并使用ChatManager发送消息,我以错误的顺序获取了脱机消息.在我的服务器上,我安装了Openfire.

例如,在线用户向脱机用户发送3个单独的消息“ A”,“ B”和“ C”.
当此脱机用户然后上线时,不会以正确的顺序接收消息.他将显示“ C”,“ B”和“ A”.为什么会这样呢?以及如何解决这个问题?

预先感谢您的任何帮助.

解决方法:

这似乎是Openfire错误或配置错误. XMPP消息应按以下顺序传递:

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

脱机消息未明确提及,但它们只是服务器功能,未在协议中进行记录.但是,它们也不例外-服务器仍应遵循这些规则.

我建议张贴到Openfire forum或提交bug report.

标签:openfire,xmpp,android
来源: https://codeday.me/bug/20191123/2064392.html