squaremo/rabbit.js — pull request #66 by manjbhachu (2014-07-21 18:04:11+00:00)
Title: Added pass through for amqplib 'blocked' and 'unblocked' events to allow...

... registration of handlers.

amqplib emits a 'blocked' event when a RabbitMQ server (after version 3.2.0) decides to block the connection. Typically it will do this if there is some resource shortage, e.g., memory, and messages are published on the connection.

It then emits an 'unblocked' event at some time after 'blocked', once the resource shortage has alleviated.

Confirmed all existing tests were passing before committing the code. Will need to use stubs in order to unit test this additional functionality, as actually causing a resource constraint in RabbitMQ stops the existing tests from running.