def consume(self, callback, queue):
        """
        Register a new consumer.

        This consumer will be configured for every protocol this factory
        produces so it will be reconfigured on network failures. If a connection
        is already active, the consumer will be added to it.

        Args:
            callback (callable): The callback to invoke when a message arrives.
            queue (str): The name of the queue to consume from.
        """
        self.consumers[queue] = callback
        if self._client_ready.called:
            return self.client.consume(callback, queue)
Register a new consumer.

        This consumer will be configured for every protocol this factory
        produces so it will be reconfigured on network failures. If a connection
        is already active, the consumer will be added to it.

        Args:
            callback (callable): The callback to invoke when a message arrives.
            queue (str): The name of the queue to consume from.