Losing Offline Messages

hi,

I’m using openfire server 3.8.2, On the certain disconnectivity of Wi-fi i’m losing my offline messages during the timespan when my presence shows online, is there any workaround or any fix ?

regards,

Ali Ashraf

S/W Engineer at VireTechnologies

In Admin Console > System Properties you can create a new entry with the name “xmpp.client.idle” (without the quotes) and set a value in miliseconds. So, if you want it to be 10 seconds, set it to 10000. This will make Openfire to disconnect idle sessions after the 10 seconds and you won’t be shown as online after that. You can set it lower, but it may create issues with some clients (client will start to disconnect continuesly if it doesn’t send keepalive packets to the server and Openfire will think it’s disconnected). That’s the fastest way to mitigate this. Btw, no server restart is required, but it takes some time to start working.

Another way would be to make support for message delivery receipts, but Spark client doesn’t support it yet.

i’m using Windows Phone 8 Client 10 sec will be enough ?

What is meant by Spark Client? it is server or client please explain about Spark Client…

Spark client is the client provided on the same site as Openfire, but it is a desktop client.

I’m not familiar with WP8 clients, so i can’t say how will it work with that limit. You can only find out by testing. maybe start with 1 minute and go down gradually (50, 30, 10 seconds). If your client is sending keepalive packets to the server, then it should work. If it is not (this may impact battery life, as keepalive packets should be sent probably every second or more often), then your client will start to disconnect often.

sounds like your phone is backgrounding the app, but is keeping status set as “online”. I had a similar issue with Xabber on Android a while back… the phone would sleep in my pocket but server would think it was still connected… causing some strangeness (it takes a little bit for the server to realize the client has lost connection as apposed to instant awareness if client sends proper “away” or “offline” status message). If so, this sounds like an app issue and possibly should be reported to the app developer if it’s a 3rd party, if it’s an actual M$ app, then good luck lol.

If it is due the connection loss (wifi), then app developer can’t do anything about it, other than supporting keepalive process and hoing that server reacts fast enough to close the lost connection.

when i use xmpp.client.idle and test with time 1 min 50sec and 10sec its increase my problem, because some time when i try to upload the image its create problem, and if user set lock screen time to something like 10-20 sec or 1 mins, then every time its reconnect …

I don’t know of any other option to work around this. Jabber and your client are not suited for mobile messaging. There are too many issues like constant connectivity loss, phone locking, saving battery, etc.

don’t know if windows phone can do this, but perhaps if the phone sends a signal that wifi is disconnecting (to go to sleep) then the client could gracefully send it’s status instead of being DC’ed. I think Android has something like this now, but I’m not sure… (i’ll ask a buddy of mine who does some android dev stuff)

Btw, after i have set this option to 10 seconds some users are experiencing reconnects a few times per day. Usually it happens on old slow computers (not happening for me). So i think their Spark hangs a bit and doesn’t send heartbeat packet for 10 seconds and server disconnects it. Happened one on the similar PC to mine, so it is not just old PCs. Today i have changed the setting to 30 seconds and will check how it goes.