A STOMP client for Web browsers and Node.js using RxJS Observables, providing a reactive approach to WebSocket messaging. Current stable version: 1.5.0. It forks the popular webstomp-client library, reimplementing the API with Observables for automatic connection sharing, reconnection, and resubscription. Key differentiators include shared WebSocket connections among subscribers, automatic reconnection with configurable retries, and automatic disconnection when the last subscriber unsubscribes. Supports modern browsers and Node.js with pluggable WebSocket libraries. Released under MIT license. Primarily used with Angular or other RxJS-based applications.
npm install webstomp-obsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a STOMP client, connects to a RabbitMQ Web-Stomp endpoint, subscribes to a queue, logs received messages, and sends a test message after 2 seconds.
Use webstompobs.over(() => new (require('ws'))('ws://...')) for Node.js.Refer to the library's own documentation or the source code for the correct method signatures.
Set a finite maxConnectAttempt or unsubscribe on component destroy to prevent resource leaks.
Stick to default text mode unless your broker explicitly supports binary STOMP frames.
Use webstompobs.over(() => new WebSocket('...')) with a WebSocket library like 'ws'.Use `import webstompobs from 'webstomp-obs'` (default import) or `const webstompobs = require('webstomp-obs')`.Set maxConnectAttempt to a finite number (e.g., 10) and handle the error Observable appropriately.