Socket
Socket
Sign inDemoInstall

antenna-amqp

Package Overview
Dependencies
8
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    antenna-amqp

AMQP adapter for Antenna.


Version published
Weekly downloads
7
increased by250%
Maintainers
1
Install size
2.55 MB
Created
Weekly downloads
 

Readme

Source

antenna-amqp

Build Coverage Quality Dependencies Tips

This module provides an AMQP 0-9-1 adapter for Antenna. AMQP 0-9-1 is implemented by popular messages brokers such as RabbitMQ.

Install

$ npm install antenna-amqp

Usage

Connect to Message Bus
var amqp = require('antenna-amqp');
var bus = new amqp.Bus();

bus.connect({ host: 'localhost', port: 5672 }, function() {
  console.log('connected!');
});
Dispatch Messages to Application
var antenna = require('antenna');
var app = antenna();

bus.on('message', app);

bus.subscribe('events/on', function(err) {
  if (err) { throw err; }
  console.log('subscribed to topic!');
});
Publish Messages
bus.publish('events/on', { time: Date.now() }, function(err) {
  if (err) { throw err; }
  console.log('published message!');
});

Tests

$ npm install
$ make test

Credits

License

The MIT License

Copyright (c) 2014 Jared Hanson <http://jaredhanson.net/>

Keywords

FAQs

Last updated on 11 Jul 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc