postwait/node-amqp — pull request #285 by cmoesel (2014-01-14 00:43:15+00:00)
Title: Implement #229: Support for Consumer Cancel Notifications

This pull request implements support for RabbitMQ's [Consumer Cancel Notifications](http://www.rabbitmq.com/consumer-cancel.html).

By default, node-amqp will work as it always did-- _without_ consumer cancel notifications. If developers want to use consumer cancel notifications, they must enable them in the client properties of the connection options. This is covered in the updates to the README.

When consumer cancel notifications are enabled, the behavior of node-amqp changes in two ways:

1. If a queue is deleted on the server or a slave queue is promoted to master, the queue object in node-amqp will emit `basicCancel`.
2. In the same case mentioned above, the queue object in amqp will also be automatically closed.

Developers can listen for the `basicCancel` event on the queue and take the appropriate action (logging a message, redeclaring, resubscribing, etc).

A new test has been created and all existing tests are passing. Please consider merging this request.