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

node-messageq

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-messageq

message queue service

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

node-messageq

node-messageq is module to provide support for producer/consumer messaging system for different message engines. Currently module provides support for following four functions, more will be updated soon.

  • publish
  • publishAsync
  • publishWithKey
  • consume

Can be installed using

$ npm install node-messageq

Configure

var options = {'driver':'rabbitMQ','AMQP_URL':'amqp://guest:guest@127.0.0.1:5672'};
var mh = require('node-messageq')(options);

publish

mh.publish('rewardsQueue',{key:'rewards',data:'hello rewards'},{persistent:true})

publishAsync

mh.publishAsync('rewardsQueue',{key:'rewards',data:'hellorewards'},{persistent:true},
function(result){
        console.log('after pub',result);
})

publishWithKey

mh.publishWithKey('rewardsQueue','mykey',{key:'rewards',data:'hello rewards'},{persistent:true},function(result){
        console.log('after pub',result);
});

consume

mh.consume('rewardsQueue', function(err, msg){
    console.log('consumed====1111',msg.content.toString());
});

create channel

 mh.createChannel(function(err,channel){
         console.log(err,channel);

  })

Keywords

mesageQ

FAQs

Package last updated on 17 May 2021

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