[ejabberd] Ejabberd Chat - disappearing chat messages

Konstantin Khomoutov flatworm at users.sourceforge.net
Mon Nov 2 21:24:34 MSK 2009


On Sat, 31 Oct 2009 09:21:50 -0700 (PDT)
darthtina <ca_arsenault at yahoo.com> wrote:

>  I've searched around, but I'm new to ejabberd and I have a big issue.
> (client in strophe on redhat) Our chat is running fine except when someone
> has an intermittent internet connection.  The logs show that they leave and
> join and leave and join:
> 
> [22:14:07] user-427-chat-42606 leaves the room: Replaced by new connection
> [22:14:23] user-427-chat-42606 joins the room
> [22:14:23] user-427-chat-42606 has set the subject to: user_427 at test....com
> [22:14:33] user-427-chat-42606 leaves the room: Replaced by new connection
> [22:14:48] user-427-chat-42606 joins the room
> [22:14:48] user-427-chat-42606 has set the subject to: user_427 at test.....com
> 
> While this going on user's not getting any messages sent or received while
> the other person in the chat is sending messages.  There has got to be a
> way, to have it setup that when the new connection is made that the messages
> are checked and synced with the server.  Please help, through me some bread
> crumbs, anything! :)

Support for reliable delivery of messages in XMPP is next to nonexistent.
But in the case of multi-user chat you could possibly exploit one of its features -- maintaining of history.
Your client should request certain amount of history each time it joins the room and decide which messages it had already seen and which it hadn't.
This will not be 100% bullet-proof, but close provided the droupouts of that client's connections don't last too long and the traffic in the room is not too heavy.


More information about the ejabberd mailing list