ITP AMPQ Node
A lightweight AMQP client for Node.js
Installation
npm install itp-amqp-node
Example
Producer
const AMQPProducer = AMQPProducer; const producer = exchange: 'itp.demo' exchange_type: 'topic' amqp_uri: processenvRABBITMQ_URI || 'amqp://localhost'; producerstart; try const routing_key = 'key.hello_world'; const message = JSON; producer; catch err console;
Consumer
const AMQPConsumer = AMQPConsumer; { try const jsonMsg = msgcontent; console; ; catch e console; ; } const opts = exchange : 'itp.demo' exchange_type : 'topic' amqp_uri : processenvRABBITMQ_URI || 'amqp://localhost' routing_key : 'key.hello_world'; const ConsoleConsumer = opts;consoleWorkerstart;
License
ITP-AMQP-Node is freely distributable under the terms of the MIT license.