hedwig-js

0.0.6 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i hedwig-js

Weekly Downloads

57

Version

0.0.6

License

Unlicense

Unpacked Size

34.4 kB

Total Files

13

Last publish

Collaborators

  • ofpiyush