kimbu
Kurt Pattyn.
Author:Kimbu is a message bus framework that implements publish-subscribe and request-response messaging patterns. It abstracts away from the underlying message transport by using pluggable messaging transport providers. Currently, only a RabbitMQ messaging transport provider has been implemented.
Motivation
Implementing publish-subscribe and request-response messaging patterns using existing transports
(e.g. AMQP, WebSockets), requires some extensive boilerplate code.
Using RabbitMQ for instance, to implement a publish-subscribe messaging pattern one needs to setup a
fanout exchange and bind the consumers via queues to that exchange.
For the request-response style of messaging, a reply queue needs to be set up and messages must be
tagged with a correlation-id
and replyTo
field. When messages return they must be matched to the
request using the correlation-id
.
Although not difficult, this requires a lot of boilerplate code.
Installation
$ npm install kimbu
or
$ npm install kimbu --production
for a production only installation (no tests, documentation, ...).
Supported Node Versions
Kimbu
supports Node
versions 0.12 and later.
To use Kimbu
with Node
versions < 4.0, you must start node
with the --harmony
flag.
Usage
var Client = Client;var Transport = Transport;var RabbitMQTransport = TransportprovidersRabbitMQTransport;var rmq = ; //use default optionsvar client = "client1" rmq {client;client;clientstart {client;client;};};
Tests
Unit Tests
$ npm test
Unit Tests with Code Coverage
$ npm run test-cov
This will generate a folder coverage
containing coverage information and a folder coverage/lcov-report
containing an HTML report with the coverage results.
$ npm run test-ci
will create a folder coverage
containing lcov
formatted coverage information to be consumed by a 3rd party coverage analysis tool. This script is typically used on a continuous integration server.
Benchmarks
$ npm run benchmark
Checkstyle
Executing
$ npm run check-style
will run the jscs
stylechecker against the code.
Static Code Analysis
Executing
$ npm run code-analysis
will run jshint
to analyse the code.
Code Documentation
Executing
$ npm run make-docs
will run jsdoc
to create documentation.