RxWebSocket v1.0.7 is an advanced RxJS WebSocket wrapper that replaces the standard WebSocketSubject with separate input/output types, reconnection with exponential backoff, message buffering during reconnect, keep-alive support, connection state tracking, and debug logging. It ships TypeScript types and supports both ESM and CJS. Released in 2021, it has no recent updates and only depends on rxjs. Key differentiators from RxJS built-in: generic type safety for send/receive, built-in reconnect logic, and buffered multiplex subscriptions.
npm install rxwebsocketNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a typed WebSocket with reconnection, state tracking, and sends a message then logs incoming messages.
Always specify generic types: rxWebSocket<InputType, OutputType>(config)
Consider using RxJS's built-in webSocket with custom reconnect logic, or test with your RxJS version.
Enable verbose logging with localStorage.debug = 'rxwebsocket:*' or similar if using custom logger.
Ensure the socket is connected before sending unsubscribe, or handle cleanup manually.
Run 'npm install rxwebsocket' or ensure import path is correct.
Use named import: import { rxWebSocket } from 'rxwebsocket'Import RxWebSocketSubject from 'rxwebsocket' instead.