'Cancels all consumers, signalling the `start_consuming` loop to
exit.
NOTE: pending non-ackable messages will be lost; pending ackable
messages will be rejected.'

def stop_consuming(self, consumer_tag=None):

    if consumer_tag:
        self.basic_cancel(consumer_tag)
    else:
        self._cancel_all_consumers()
