kobit's picture
Submitted by kobit on Sat, 2008-05-17 09:14.

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.


Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
B
R
Q
6
Enter the code without spaces and pay attention to upper/lower case.