简体   繁体   中英

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). Please suggest me some solution

The default setting in ejabberd example config file is to limit the number of offline messages to 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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