XEP 0136 (Message Archiving)
Hello
I noticed you have an unfinished implementation of message archiving (XEP 0136) in both tigase server and xmpp4gwt. I need basic message archiving functionality, even if only to store messages temporarily and to retrieve them when a session is still active.
Maybe trying to finish your XEP 0136 implementation is a bit overkill for my needs, so maybe I should just write a basic plug-in, but I am having trouble figuring out how they work. (I have read your post explaining plug-ins/components/etc., and I've looked through the code in xmpp/impl.) As a start, how would I get a simple plug-in to have its process() method called whenever a message packet is sent?
Thanks :)
Trackback URL for this post:
- Add new comment
- 275 reads






Thanks for the hint, I'm starting to make some progress now. I'll post again if I need more help.
Cheers :)
The best starting point for you is tigase.xmpp.impl.OfflineMessages class. Based on it you should be able to implement something simple in quite short time.
It archives messages for users who are offline in postProcess(...) method and pushes messages to the user when he comes online in process method.
You case is quite similar but you would archive all messages instead of messages for offline users and message retrieving would be triggered by a different packet type than
presence.This would be very simple and quick but I wouldn't recommend it for high traffic service and also another disadvantage is that you can't access archived messages from any other application (like web application). This is because they are stored in the Tigase server database format which might be quite hard to access from another application.
It is also possible to store messages in some other place if you need. I just need more details of your case and system to recommend the best solution.