0
votes

I use Tigase as XMPP server. Everything is OK, but sometimes i receive offline messages twice, the second after 25 mins after 1st (sometimes after a day) for example:

2013-01-03 11:53:00.923 xmppStreamDidReceiveMessage: 
<message xmlns="jabber:client" id="20" type="chat" 
   to="[email protected]" from="[email protected]">
   <body>r1</body><delay xmlns="urn:xmpp:delay" stamp="2013-01-03T09:52:55.392+0000" 
   from="chat.quickblox.com">Offline Storage - ip-10-40-233-192.ec2.internal</delay>
   </message>


2013-01-03 11:53:25.091 QBChat/xmppStreamDidReceiveMessage: 
<message xmlns="jabber:client" id="20" type="chat" 
    to="[email protected]" from="[email protected]">
    <body>r1</body><delay xmlns="urn:xmpp:delay" stamp="2013-01-03T09:52:55.418+0000" 
    from="chat.quickblox.com">Offline Storage - ip-10-40-233-192.ec2.internal</delay>
    </message>

They have the same ID & text.

I don't know what the problem is, there isn't any repro, random repro. 1st user just send message to 2nd, and 2nd does login/logout, login/logout..

Thanks for your advice

Upd: Sometimes I receive 2 equal messages: 1st is normal message & 2nd with 'delay' param

1

1 Answers

1
votes

The stamp is different which suggest this message was recorded twice in the DB. Do you use a web clients by any chance? It may happen that a web client thinks that a message was not received by the server and sends it again. However, then the stamp difference would be probably a few seconds instead of a few milliseconds.

To me it looks like the original sender sent the message twice and it was recorded 2 times in the offline storage and then delivered to the receiver. However, if the sender sends message twice sometimes, then it would also happen that a normal, not offline message is sometimes doubled....

Really hard to say something for sure with so little information.