I am developing a simple server, the main task of which is to push notifications to users, like a typical Push Notification Server . I used java websockets to push notifications to users through a websocket session. In development, I have a list of some requirements in which reliable message delivery is one of the requirements.
I click on a notification to a specific user as shown below,
session.getBasicRemote().sendObject(notification);
but the above method returns void , so I canβt conclude if the notification is sent to the other end or not. One option was that the intended user would send feedback to my server for the same notification, and I mark the same notification that was delivered successfully. But this can lead to increased network traffic.
Is there a standard way to ensure that a notification is delivered successfully when sent through a websocket session
java websocket
Ravindra thorat
source share