7
votes

I'm using XMPP (through ejabberd). As per this XEP standard, I find that XMPP server can store offline messages and can deliver them when a offline user comes online(shares his presence).

My question is:

1> How long these offline messages can be stored in the server? (What is the Maximum Validity of the offline messages, as user may login after 1 month also, he must not miss any message)

2> If there is a time period after which the messages may expire, where can I increase this time limit?

3> And what is the maximum limit of messages that can be stored in XMPP server?

1

1 Answers

5
votes

For the offline message storage, ejabberd implements the module called mod_offline using XEP-0160.

1) There is no any maximum validity to store the offline messages. This means that all the messages sent to an offline user will be stored on the server until that user comes online.

2) You can set the limit of messages you want to store in server as:

access:
  max_user_offline_messages:
    admin: 5000
    all: 100

modules:
  mod_offline:
    access_max_user_messages: max_user_offline_messages

This allows to store upto 5000 offline messages for admin's and 100 offline messages for all the other users.

For more please follow the official docs of the mod_offline here