Real life scenario : I'm using Join to pass notifications from my smartphone to my smartwatch (full android 5.1). My phone sends notifications to my smartwatch, but smartwatch is not connected to the internet in the moment when notification was pushed. I connect smartwatch to the internet after, let say 5 mins, and I have no any info that I missed notification.
Suggested solution : your mediation server should have 'delivery' status. When push is performed status is set to 1. Successful delivery (handshake from remote party) reset status to 0. In situation when delivery was unsuccessful (remote party off line), status stays 1. Now device which was a receiver of notification connects to the internet, application connects to mediation platform and check 'delivery' status. When 0 - all ok. When 1 - 'ask' sender to resend notifications.
This approach will work asynchronous, also there is no need to store notifications. Just the status.