code: def stop(self):
          
          while self._consumers:
              consumer = self._consumers.pop()
              consumer.stop()
          self._stopped.set()
          self._connection.close()
docs: Stop all consumers.
  
          :return: