MUC messages should be written to database immediately
This issue builds on OF-1200, and is closely related.
applied a mechanism to write data-to-be-accessed-through-archiving-functionality to the database nearly instantly, as opposed to batching these for long amounts of time (which causes queries for data to miss elements that were pending, in a batch).
applied this to the monitoring plugin only. As the monitoring plugin uses data written by Openfire core (and not only written by the plugin itself, as was previously assumed), didn't resolve the larger issue.
A similar mechanism as introduced to the Monitoring plugin in should be applied to the MUC message history mechanism.
Then, the Monitoring plugin can be modified to make use of this new functionality (see https://github.com/igniterealtime/openfire-monitoring-plugin/issues/38 )
We've neglected to mark this issue as resolved when the feature was added to Openfire 4.4.0. Doing that now.
Not sure if this is related but user here https://discourse.igniterealtime.org/t/message-lost-on-openfire-restart-version-4-3-2/85743/5 reports that MUC messages are not saved to DB when restarting Openfire service on Linux, but saves correctly on Windows when shuttling down Openfire.