Message lost while the receiver's presence is not updated in OF server

I have browsed this forum searching solution for this problem but couldnt find one. My issue is same as this,

Losing offline messages to unreachable clients | Ignite Realtime ml

I have configured the Ping request from server side for 30 seconds. But still 30 second is huge time. During that time lots of message are getting lost.

  1. XEP-0184 is more of a client side delivery receipt management. Is that possible that i can get the acknowledgement in server as well?

  2. Is it possible to store all the message in OF until we receive the delivery receipt from receiver. And delete the message from OF once we get the delivery receipt.

Please suggest me on how to prevent this message loss.