node-amqp-wrapper
A simple wrapper to https://github.com/squaremo/amqp.node.
Allows you to have any number of publish queues, one consume queue and to perform consume and publish operations.
Handles assert/declare of queues.
Example usage
var AMQP = ; var queues = consume: name: processenvAMQP_CONSUME options: deadLetterExchange: processenvAMQP_DEAD_LETTER_EXCHANGE publish: name: processenvAMQP_RESPONSE routingKey: processenvAMQP_RESPONSE_ROUTING_KEY options: /* ... */ // options passed to ch.assertQueue() in wrapped lib. // ... ; AMQP; // Set the QOS/prefetch.AMQP; // Consumingvar { //...};// You must call:// in your handleMessage. If `err` !== `null` then the message will be `nack`ed.// Requeueing will be requeue iff `requeue` is `true`.// If `err` is `null` then the message is `ack`ed.// If an exception occurs in handleMessage, then the message is `nack`ed and not requeued. // Start consuming:AMQP; // Publishing to one of the queues declared on connect.AMQP; // Publishing to arbitrary routing key.AMQP;