qpid

0.0.1 • Public • Published

node-qpid

A Node.js native wrapper around Apache Qpid, specifically the AMQP 1.0 Proton C API

Usage

You can use it to exchange messages with AMQP 1.0 brokers:

// Sending
var Messenger = require('qpid').proton.Messenger;
var m = new Messenger();
 
m.send({address: address, body: message}, function(err) {
  if (err) {
    console.log("Error sending message: " + err.message);
  }
});
 
// Receiving
var Messenger = require('qpid').proton.Messenger;
var m = new Messenger();
 
m.on('subscribed', function(url) {
  console.log("Subscribed to " + url);
});
 
m.on('message', function(message) {
  console.log(message.body);
});
 
m.subscribe(address).receive();

The module has been preliminarily tested against:

Peer-to-peer support is a work in progress

Installation

It expects you to already have version 0.3 of the qpid-proton library installed on your (Linux) system. Windows support will follow when version 0.4 of proton is released.

Issues

It's still rough around the edges and not ready for prime time, but pull requests are welcomed!

Acknowledgements

node_sqlite3 has been an invaluable resource while writing this native module!

Readme

Keywords

none

Package Sidebar

Install

npm i qpid

Weekly Downloads

3

Version

0.0.1

License

MIT

Last publish

Collaborators

  • pofallon