Openfire lost messages

the client side does not have a connection, messages disappear when the client-side connection is gone. How do I fix this.

No easy way. You can read this for some information. Explanation: options to mitigate messages loss because of network problems