简体   繁体   English

Android smack 4.1充满了脱机消息ejabberd

[英]Android smack 4.1 flooded with offline messages ejabberd

I am working on chat app by using smack 4.1 and ejabberd-15.11 my scenario is - if client A,B,C,D send messages to E and E is offline then all messages stores in offline storage but when user E comes online android client becomes unresponsive if number of offline stored messages are in huge amount (3000-5000). 我正在使用smack 4.1和ejabberd-15.11在聊天应用程序上工作,我的情况是-如果客户端A,B,C,D向E发送消息,而E处于脱机状态,则所有消息都存储在脱机存储中,但是当用户E联机时,Android客户端如果大量脱机存储的消息(3000-5000),则变得无响应。 Please suggest me some solution 请给我一些解决方案

The default setting in ejabberd example config file is to limit the number of offline messages to 100. ejabberd示例配置文件中的默认设置是将脱机消息的数量限制为100。

  max_user_offline_messages: 
    admin: 5000
    all: 100

New messages will be rejected and sender will be notified with an error. 新邮件将被拒绝,发件人将收到错误通知。

If you user is an admin but you are expecting to connect as admin from Android, you can also configured ejabberd to limit the number of offline messages for admin to 100 messages. 如果您是管理员,但希望从Android以管理员身份进行连接,则还可以配置ejabberd将admin的脱机消息数限制为100条消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM