The Socket.IO MongoDB adapter, allowing to broadcast events between several Socket.IO servers
MIT License
Bot releases are hidden (Show)
Published by darrachequesne 9 months ago
Published by darrachequesne over 1 year ago
This adapter is now compatible with the connection state recovery feature, which was added in [email protected]
.
Reference: https://socket.io/docs/v4/connection-state-recovery
Added in 02e4d57.
Upon reconnection to the MongoDB server, the client will now try to resume the stream at the last offset it has processed.
If the MongoDB client is disconnected for too long and its token is no longer valid, then the Socket.IO clients connected to this server may miss some packets (which was the previous behavior).
Added in e77063b.
Published by darrachequesne over 2 years ago
The addCreatedAtField
option allows to use a TTL index instead of a capped collection, which is slightly less efficient but more predictable.
This feature was added in [email protected]
:
io.timeout(1000).emit("some-event", (err, responses) => {
// ...
});
Thanks to this change, it will now work with multiple Socket.IO servers.
The adapter will now create one single MongoDB stream for all namespaces, instead of one per namespace, which could lead to performance issues.
Published by darrachequesne over 3 years ago
Initial release!