def stop(self):
        """Stop all consumers.

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

        :return: