New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

stompjs-nodejs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stompjs-nodejs

A nodejs wrapper for stompjs

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

stompjs-nodejs

Wrapper for stompjs works with nodejs and with typings

Usage

npm i stompjs-nodejs --save

example with active MQ.

import { StompClient } from 'stompjs-nodejs';

const client = new StompClient({
    brokerUrl: 'ws://localhost:61614/ws',
    user: 'user',
    password: 'password',
});

client.subsribe('/topic/name', (msg) => {
    console.log('received', msg);
});

client.publish('/topic/name', 'a message to pub');

subsribe and publish will auto connect at first call (lazy init)

but if you want to connect in advance, can do

await client.connect()

Notes

Currently it only tested to work with active MQ, I did not test on other MQ lib.

Currently this wrapper only works for pub/sub mode, doesn't work for queue yet.

contributions are welcome.

Special thanks to original authors of stompjs https://github.com/stomp-js/stompjs

Keywords

nodejs

FAQs

Package last updated on 20 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts