hubby
, A high feature, distributed, low latency and secure message exchange bus based on redis
and mongodb
Warning I: this project is in early development stage, you might not find it useful for now.
Hubby has the following features working:
- Message queue
- Message broadcast
- Message schema validation using
amanda
Each schema has his own queue, so listener programs will need to subscribe to schema names.
Install from npm
$ npm install hubby
Usage
var hubby = ; hubby; hubby; // redis and mongo configuration// these are the default valuesvar conf = redis: host: 'localhost' port: 6379 mongo: host : 'localhost' port : 27017 db: 'hubby' args : auto_reconnect : true ; // if mongo and redis are in their default ports, you don't need to use the conf parameterhubby; // sending a message // sample message contentvar content = sender: 'test@test.com' recipient: 'test2@test.com' subject: 'this is a test message' body: 'nothing special here'; // get the schemahubby;
Available events
hubby.on('broadcast', function(messageNotification){})
hubby.on('<schema name>', function(messageNotification){})
API
Big TODO here.
TODO
- better documentation of the source code;
- better error handling
- code cleanup
- a real document page, examples, and so on;
- tests!
jsHint standardswe don't like code standards.
License
Copyright (C) 2012 Humantech Gestao do Conhecimento
Distributed under the MIT License, the same as NodeJS.
Read this if you're in doubt.