pladaria / reconnecting-websocket

Reconnecting WebSocket. For Web, React Native, cli (Node.js)
MIT License
1.23k stars 199 forks source link

Dequeue Events from send #171

Open sheikx1221 opened 2 years ago

sheikx1221 commented 2 years ago

Reconnecting web socket is a great tool and we this in most of our production apps. One issue I have noticed is that there is no way to dequeue a certain send message

We have a service that resends the event after timeout has reached, in order to make sure data is send to server. The problem is that previous issues do not dequeue from the array, therefore once the server is back online all the events in the queue are sent to server (most of which are duplicated now because of the service).

Is there a way we can dequeue the event. In order to reduce redundant requests going to the server from socket?