【问题标题】:Sent messages coming back in XMPP在 XMPP 中返回的已发送消息
【发布时间】:2014-07-18 05:51:13
【问题描述】:

我已经使用 aSmack 库在 android 中实现了聊天。我面临的问题是,如果其他用户未登录到 XMPP,我将取回我发送给其他用户的消息。它并不总是发生,但只有在发送太多消息之后,我才开始收到我发送给其他用户的相同消息,就像它来自其他用户一样。

我检查了用户 ID,它显示消息来自其他用户。当其他用户登录时,一切正常。

请帮助我找到解决此问题的方法。

【问题讨论】:

  • 您收到的邮件是否具有type 属性error?许多 XMPP 服务器完整地返回失败消息,只是更改了 type 属性并添加了错误条件元素。
  • @legoscia:我使用了最新的 asmack jar,问题解决了。

标签: android xmpp ejabberd asmack


【解决方案1】:

检查 openfire 服务器的存储策略和存储存储最大大小。

存储 - 存储离线消息以供以后检索。邮件将在收件人下次登录时传送。请在下面选择存储策略和存储存储最大大小。

**Store or Bounce - Store messages up to the max storage size. After the max size has been exceeded, bounce the message back to the sender.**
Always Store - Always store messages, even if the max storage size has been exceeded.
Store or Drop - Store messages for a user up to the max storage size. After the max size has been exceeded, silently drop messages.

每用户离线消息存储限制:KB 退回 - 永远不要存储离线消息并将消息退回给发件人。 丢弃 - 永远不要存储离线消息和丢弃消息,以免通知发件人。

【讨论】:

    猜你喜欢
    • 2011-05-31
    • 1970-01-01
    • 1970-01-01
    • 2013-02-12
    • 2015-08-24
    • 1970-01-01
    • 1970-01-01
    • 2017-06-01
    • 2013-10-28
    相关资源
    最近更新 更多