-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add notion of volatile message to the client #2003
Comments
👍 |
Will be in |
That issue was closed automatically. Please check if your issue is fixed with the latest release, and reopen if needed (with a fiddle reproducing the issue if possible). |
Has this been implemented? as if not I would still like to keep it open |
@darrachequesne is this the feature you want? Flag: ‘volatile’ |
It was years ago when I raised this, but yes the server can flag messages as volatile but the client does not have this notion I think, so when the client is sending messages to everyone in some cases you dont care if the message reaches them all, its more a UDP style fire and forget compared to the standard TCP "We deliver" approach. As mentioned originally I think it was a case of a client sent out a "ping" message to all others in the channel to tell them they are still active and there, but if the server went down, the client isnt discarding the failed messages and keeps backing them up, so when the server comes back online it will send |
@grofit can you pass me some code to reproduce this? I have tried with chat app but cannot see this issue.
Is there anything wrong with my test? |
That seems fine, are you somehow marking those messages as volatile in the client, or letting the server know those messages should be fire and forget? as the behaviour you mention there was not the behaviour I was seeing when this was raised (granted this was 4 years ago). If it seems to be working as expected feel free to close this |
Closed by socketio/socket.io-client@7ddad2c and included in v3. |
This was discussed on Slack, just wanted to capture it here incase it was not done so elsewhere.
The server has the notion of a message that it will try to deliver and if it fails it does not try again, as the message is deemed supplementary not mandatory. Currently the socket io javascript client does not have this notion so certain messages will back up which are not needing to.
In my scenario it is a ping to notify others that the person is still active, if one of these is missed it is not important, however if the server were to go down these messages back up and really you only need the latest one, not any previous ones, so it would be good to be able to mark them as volatile so any missed ones are ignored not backed up.
The text was updated successfully, but these errors were encountered: