amqpevents
v0.0.2
Published
Event emitter using amqp as a data store and a topic exchange
Downloads
1
Maintainers
Readme
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 });