Tell RabbitMQ that we would like to stop consuming.

def stop_consuming(self):
        """Tell RabbitMQ that we would like to stop consuming."""
        if self._channel:
            logger.debug('Sending a Basic.Cancel RPC command to RabbitMQ')
            self._channel.basic_cancel(self.on_cancelok, self._consumer_tag)