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

antenna-amqp

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antenna-amqp

AMQP adapter for Antenna.

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 11 Jul 2014

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