0.0.6 • Published 6 years ago

hedwig-js v0.0.6

Weekly downloads
190
License
Unlicense
Repository
github
Last release
6 years ago

Hedwig

JS client similar to hedwig-py

Hedwig makes connecting to any AMQP 0.9.1 server simple.

It wraps amqplib and exposes few simple functions over it.

It handles reconnection, exponential backoff, publish queueing etc internally.

Installation

npm install --save hedwig-js

API

Like it's python cousin, Hedwig exposes 1 method to publish and one to consume.

const hedwig = new Hedwig(configuration, err_callback, close_callback)
// Ask hedwig to start consuming from RabbitMQ
hedwig.consume();

let buffer_payload = new Buffer("hello world");
// Publish a message to 
hedwig.publish("my.routing.key.here", buffer_payload);

Thats it!

Examples

Do check the examples directory for examples on how to use hedwig.

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago