I am developing a simple server whose primary task is to push notifications to users like a typical Push Notification Server
. I have used java websockets
for pushing the notification to the users through websocket session. While developing the same I have a list of some requirements in which reliable message delivery is one of the requirement.
I am pushing the notification to particular user like below,
session.getBasicRemote().sendObject(notification);
but above method returns void
, thats why I am not able to conclude whether the notification is delivered to the other end or not.
One of the option was, intended user will send feedback to my server for the same notification and I will mark the same notification as delivered successfully. But it could cause a increase in network traffic.
Is there any standard way to make sure that the notification is delivered successfully while sending it through websocket session
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…