Message lost in openfire and ghost sessions

hello all

i am working on a social network program and use openfire and smack.scenario which i face with this problem is here:

two users are chating with each other and every thing is good suddenly a user lost his/her connection to server.

and other does not know this and continue to sending message. server idle time is around 10 sec and server still keep alive

disconnected user’s session and send received message to this session. disconnected user does not receive these messages

and server does not keep them as offline message and result is “LOST messages”.

i search in google and face with subjects such as XEP-0198 or ejabberd stanza ack.

now i need to know is there an implementation of these subjects in openfire or smack?

and will this subject help me to solve this problem ?