streadway/amqp — pull request #65 by streadway (2013-05-25 08:38:55+00:00)
Title: Application testable Delivery - API Change

References #64

* Add Ack/Nack/Reject to the Channel
* Add Delivery.Acknowledger interface delegating to the channel
* Drop Delivery.Cancel

By using an Acknowledger delegate, it remains possible to multiplex
deliveries from multiple channels to the same handler without requiring
the application to keep a reverse mapping from delivery back to the
source channel for the common case of Acks.

Application tests can now simulate deliveries, and track acknowledgments
per source channel via a custom implementation.

Remove the `Cancel` delegate in Delivery. Use the Channel directly to
cancel a subscription.

To handle Cancel, including other richer interactions with the Channel
in application consumers, the channel reference should be passed along
with the delivery in an application specific type to the consumer.