'End all active queue consumers.
Note:
This does not affect already delivered messages, but it does
mean the server will not send any more messages for this consumer.'

def cancel(self):

    cancel = self.channel.basic_cancel
    for tag in values(self._active_tags):
        cancel(tag)
    self._active_tags.clear()
