gmr/rabbitpy — pull request #39 by cenkalti (2014-09-01 12:58:50+00:00)
Title: Implement cancellation of Consumer

Hello @gmr
I have added `Consumer.cancel()` method and have done some refactoring. I believe that I did not make any changes that breaks backward compatibility.
In order to cancel a consuming `Consumer` I had to inject a new object (`base.InternalCommand`) into the channel's read queue when a `Basic.CancelOk` frame is received.
It does not support cancellation of multiple concurrent consumers yet because `CancelConsumer` objects do not have any identifier for consumers (`consumer_tag`). However, it works perfectly for a single consumer.
If you want a change about this, I can modify my pull request.