Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amqper

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amqper

A simple and elegant AMQP client for node based on amqplib.

  • 0.1.6
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

amqper

NPM version Build Status Dependency Status

A simple and elegant AMQP client for node based on amqplib.

Install

$ npm install --save amqper

Usage

round-robin

Run multiple consumer.js for round-robin shared.

consumer.js

var amqper = require('amqper');

var client = amqper.connect('amqp://guest:guest@localhost:5672');

client.$promise.then(function () {
  console.log('ready');
  client.route('test.a', function (message) {
    console.log(message.payload);
  });
});

producer.js

var amqper = require('amqper');

var client = amqper.connect('amqp://guest:guest@localhost:5672');

client.$promise.then(function () {
  for (var i = 0; i < 10; i++) {
    client.publish('amq.topic', 'test.a', i);
  }
});

License

MIT © Tao Yuan

Keywords

FAQs

Package last updated on 29 Jul 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc