{"repo":"socketio/socket.io-mongo-adapter","free":true,"listed":false,"github":"https://github.com/socketio/socket.io-mongo-adapter","clone":"git clone https://github.com/socketio/socket.io-mongo-adapter.git","description":"The Socket.IO MongoDB adapter, allowing to broadcast events between several Socket.IO servers","language":"TypeScript","stars":23,"topics":["socket-io","websocket","mongodb"],"license":"MIT","category":"networking-infra","readme_excerpt":"Socket.IO MongoDB adapter The @socket.io/mongo-adapter package allows broadcasting packets between multiple Socket.IO servers. Unlike the existing socket.io-adapter-mongo package which uses tailable cursors, this package relies on change streams and thus requires a replica set or a sharded cluster. Table of contents - Supported features - Installation - Usage - Usage with a capped collection - Usage with a TTL index - Known errors - License Supported features Feature socket.io version Support --------------------------------- --------------------- ------------------------------------------------ Socket management 4.0.0 :white check mark: YES (since version 0.1.0 ) Inter-server communication 4.1.0 :white check mark: YES (since version 0.1.0 ) Broadcast with acknowledgements 4.5.0 :white check mark: YES (since version 0.2.0 ) Connection state recovery 4.6.0 :white check mark: YES (since version 0.3.0 ) Installation Usage Broadcasting packets within a Socket.IO cluster is achieved by creating MongoDB documents and using a change stream on each Socket.IO server. There are two ways to clean up the documents in MongoDB: - a capped collection - a TTL index Usage with a capped collection Usage with a TTL index Known errors - MongoError: The $changeStream stage is only supported on replica sets Change streams are only available for replica sets and sharded clusters. More information here. Please note that, for development purposes, you can have a single MongoDB process acting as a rep","default_branch":null,"files":null,"tree":[],"storefront":"/r/socketio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/socketio/socket.io-mongo-adapter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}