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

nodejsmq

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodejsmq

A simple rabbitmq implementation

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

NodeMQ

A simple rabbitmq library.

Installation

npm install --save nodejsmq

Quick Example

import nodejsmq from 'nodejsmq';

// create a connection to the rabbitmq server
const nodeMQ = nodejsmq('amqp://rabbitmq/');

// start consuming
nodeMQ.consume({
  queueName: 'myqueue',
  onMessage: (msg,channel,body)=>{
    console.log('Recieved message');
    console.log(body);
    nodeMQ.reply(msg, channel, 'My Response');
  },
});

// publish a message
nodeMQ.publish('myqueue','Send this info!')
  .then((response)=>{
    console.log('the consumer responded!');
    console.log(response);
  });

Full API Reference

Keywords

rabbitmq

FAQs

Package last updated on 25 Jan 2022

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