Group chat history (MUC) should match configuration after server restart

Description

Confirmed that the MUC conversation log feature has been implemented in the server with a hard-coded limit of two days' worth of discussion history (re-)loaded for persistent rooms after a restart. This appears to be in compliance with the specifications (XEP-0045, 7.2.14), which are somewhat ambiguous about managing discussion history as follows:

Whether such history is sent, and how many messages comprise the history, shall be determined by the chat service implementation or specific deployment depending on local service policy or room configuration.

However, it is also inconsistent that we allow "Show Entire Chat History" via the admin console, but after a restart the persistent room history is constrained by a hard-coded limit of two days. It would seem that the MUC persistence manager should consult the room and/or service settings to determine how much of the conversation history should be loaded after a restart.

I will change this ticket into a feature enhancement request.

Environment

None

Activity

Show:

wroot April 26, 2014 at 11:16 AM

Something is wrong with the table in that document. I can't also copy it to the new document. It won't save either. I have tested the build with this change and it loads older history now. Also i think this new property overlaps with (though it says minutes, not days). And it would be great to have a GUI option for this on the History Settings page (this way this option will be easier to discover than having it on some buggy document in the forums).

Tom Evans April 22, 2014 at 8:16 PM

FYI @daryl - I tried to edit the Openfire Properties document to add this new property, but was not able to save my changes after multiple attempts. Not sure if the permissions have changed for that document, but if you're able to edit it feel free to add this property (and definition) at your convenience.

Tom Evans April 22, 2014 at 7:49 PM

Reload full chat history for MUC rooms that have conversation logging
enabled. Allow limit to be set via new "xmpp.muc.history.reload.limit"
property. If set, this property defines a number of days to limit the
history reload; defaults to original value of 2 if the property value is
non-numeric.

wroot April 21, 2014 at 8:44 AM
Edited

Another observation (for my issue). I have set flush interval to 10 seconds and waited 20 seconds before shutting down the server and after the restart the recent history was there. So if server is restarted before the flush happens, it loses all the recent history which wasn't flushed yet. Maybe it should try flushing history before shutting down? Keeping this setting at 1-10 seconds probably can impact the performance.

I will file another ticket for this.

wroot April 21, 2014 at 8:34 AM
Edited

Tom, your comment still doesn't explain my issue (and maybe it is few different issues here). I don't get any history message after i restart a server, not even a few minutes old.

Error.log shows this when i shutdown the server:
2014.04.21 11:38:08 org.jivesoftware.openfire.XMPPServer - Exception during module shutdown
java.lang.NullPointerException
at org.jivesoftware.openfire.pubsub.PubSubEngine.shutdown(PubSubEngine.java:1743)
at org.jivesoftware.openfire.pep.PEPServiceManager.stop(PEPServiceManager.java:208)
at org.jivesoftware.openfire.pep.IQPEPHandler.stop(IQPEPHandler.java:202)
at org.jivesoftware.openfire.XMPPServer.shutdownServer(XMPPServer.java:979)
at org.jivesoftware.openfire.XMPPServer.access$800(XMPPServer.java:148)
at org.jivesoftware.openfire.XMPPServer$ShutdownHookThread.run(XMPPServer.java:925)

probably not related to room history

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created March 27, 2014 at 10:14 PM
Updated April 26, 2014 at 11:16 AM
Resolved April 22, 2014 at 7:49 PM