as

amqp-simple

Simplified amqp usage that supports retries

Showing:

Popularity

Downloads/wk

3

GitHub Stars

0

Maintenance

Last Commit

6yrs ago

Contributors

2

Package

Dependencies

3

Size (min+gzip)

49.7KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

amqp-simple

Simplified amqp usage that supports retries, time outs, exceptions

var amqp = require('amqp-simple');
connection = new amqp.Connection({ 
  url: 'amqp://dockerhost',
  logger: function () {}  // ignore all logging
});
connection.open(function (err) {
  console.log('opened');
  connection.subscribe({
    routingKey: 'mykey',
    consumer: 'consumer',
    handler: function (msg, callback) {
      console.log('received message: ', msg);
      callback(); // acknowledge this message
      connection.close();
      console.log('disconnect?')
    }
  }, function () {
    connection.publish({
      routingKey: 'mykey',
      body: {
        hello: 'world'
      }
    }, function () {
      console.log('published message.')
    }); 
  });
});

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100