0.0.2 • Published 9 years ago

amqpevents v0.0.2

Weekly downloads
3
License
ISC
Repository
gitlab
Last release
9 years ago

amqpevents

Event emitter using amqp as a data store and a topic exchange

Usage

var events = require('amqpevents');

// declare a publisher
var publisher = events
  .publisher('location')
  .connect('amqp://localhost')
  .event('location.locked')
  .event('location.lost');

// declare a subscriber
var subscriber = events
  .consume(publisher)
  .listener(console.info)
  .pattern('location.*')
  .subscribe();

// publish an event
publisher.publish('location.lost', { lat: 33.23, lng: 150.11 });

API Documentation