yaxim-org / yaxim

yaxim - a lean XMPP/Jabber client for Android
https://yaxim.org
GNU General Public License v3.0
486 stars 238 forks source link

Feature request: resend lost message automatically #88

Closed blackdog1987 closed 11 years ago

blackdog1987 commented 11 years ago

When I test it, I send 100 messages. unfortunately I lost many of them(they are not ACKED). So I have to resend them one by one. I want to resend all of them after minutes they've been sent or just cilck a "Resend lost message" button. So:

  1. I need a thread to check the ‘chat table’ per 600s. If it found any message is not ACKED for more than 600s, it will resend it again. In openfire 3.8.0 I set 'Idle Connections Policy' to 600s, so it guarantee if the user didn't login again I will send 'offline message'. Or if it's online I'll do all of these once again to avoid packet lost.
  2. just need a button to resend all 'lost message'

maybe I have to change ChatConstants.DELIVERY_STATUS's design.

btw, openfire seems can hardly know who are droped accidently. Is there any openfire plugins can deal with the problem?

ge0rg commented 11 years ago

What you really need is XEP-0198, and I am working hard on getting it into yaxim. Once it is in place, yaxim will automatically resend messages lost due to connection issues, provided the server supports it...

Message Acknowledgements are not really intended for re-sending; there is no way to filter out duplicates in case the ACK was lost and not the message itself.

Regarding OpenFire, I can not help you at all, sorry.

tejasinamdar commented 9 years ago

We have developed the plugin to ensure that no messages are lost (in the context of Openfire). Using Openfire, in the presence of a weak network, messages/packets are lost. Hence, to ensure deliveries (at-least-once) and no message/packet losses we have developed the plugin. The plugin ensures 'Stanza Acknowledgements' (the ability to know if messages have been received by one's peers) with no losses (at-least-once deliveries).

For more information, please see- https://www.atklique.com/bridge/blog/?q=node/5

For more information (and integration of the plugin with Openfire), please drop an email to support@atklique.com with you requirements.

inamdartejas commented 9 years ago

Using Openfire, in the presence of a weak network (or when user switches/changes the network), messages/packets are lost.

'Stop Message Loss' plugin may serve your need well. Please see- https://www.atklique.com/bridge/blog/?q=node/5

The plugin ensures that no messages are lost (in the context of Openfire). It implements server acknowledgement for each message received by the server. The plugin ensures deliveries (at-least-once).