STOMP.js provides a STOMP messaging client for browser and Node.js applications, supporting WebSocket and TCP transports. The latest version is 2.3.4-next, last updated in 2015 and no longer maintained. It offers a simple API for connecting to STOMP brokers, subscribing to queues/topics, and sending messages. Key differentiators include lightweight no-dependency design for browsers and dual TCP/WebSocket support in Node.js. However, it lacks modern ESM support, TypeScript types, and has known issues with binary frames and reconnection. For new projects, consider active alternatives like @stomp/stompjs.
npm install stomp-websocketNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to a STOMP broker via WebSocket, subscribes to a queue, and sends a message.
Switch to @stomp/stompjs or other actively maintained STOMP client.
Use dynamic import or bundler interop for ESM projects.
For TCP connections: var client = Stomp.overTCP('localhost', 61613);Implement custom reconnection logic using client.onclose event.
Use 'var Stomp = require("stompjs");' instead of ES import.Verify broker URL and ensure WebSocket is supported (use ws:// not http://).
No dependency data recorded yet.