0.1.1 • Published 3 years ago

node-messageq v0.1.1

Weekly downloads
118
License
-
Repository
github
Last release
3 years ago

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);

  })
0.1.1

3 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago