In openfire how to archive a chatroom and its messages and delete chatrooms which old after certain days

In openfire if the chatrooms are inactive for certain x days how can we automatically archive the chatrooms and its message and also delete if its inactive or older than y days. Is there any configuration or how can it be implemented.

Because it can increase performance issue as users will fetch all the chatrooms and join each room in long run.

Openfire does not have the concept of ‘archiving’ a chat room. What it does support is unloading the chatroom from memory, after a certain amount of inactivity. This can be configured in the Openfire admin console, under the MUC service settings.

There is no feature to automatically remove chat rooms completely, after a certain amount of inactivity.

If you use the Monitoring plugin to maintain the message archive log, you can use this to remove old entries. Again, this can be configured through the admin console, under Server > Archiving > Archive Settings: