def __init__(
        self, amqp_url=None, exchanges=None, queues=None, bindings=None, consumers=None
    ):
        """Initialize the service."""
        service.MultiService.__init__(self)
        amqp_url = amqp_url or config.conf["amqp_url"]
        self._parameters = pika.URLParameters(amqp_url)
        if amqp_url.startswith("amqps"):
            _configure_tls_parameters(self._parameters)
        if self._parameters.client_properties is None:
            self._parameters.client_properties = config.conf["client_properties"]
        self._exchanges = exchanges or []
        self._queues = queues or []
        self._bindings = bindings or []
        self.factory = self.factoryClass(
            self._parameters, exchanges=exchanges, queues=queues, bindings=bindings
        )
        consumers = consumers or {}
        for queue, callback in consumers.items():
            self.factory.consume(callback, queue)
        warnings.warn(
            "The FedoraMessagingService class is deprecated and will be removed"
            " in fedora-messaging v2.0, please use FedoraMessagingServiceV2 instead.",
            DeprecationWarning,
        )
def __init__ ( self , amqp_url = None , exchanges = None , queues = None , bindings = None , consumers = None ) : service . MultiService . __init__ ( self ) amqp_url = amqp_url or config . conf [ "amqp_url" ] self . _parameters = pika . URLParameters ( amqp_url ) if amqp_url . startswith ( "amqps" ) : _configure_tls_parameters ( self . _parameters ) if self . _parameters . client_properties is None : self . _parameters . client_properties = config . conf [ "client_properties" ] self . _exchanges = exchanges or [ ] self . _queues = queues or [ ] self . _bindings = bindings or [ ] self . factory = self . factoryClass ( self . _parameters , exchanges = exchanges , queues = queues , bindings = bindings ) consumers = consumers or { } for queue , callback in consumers . items ( ) : self . factory . consume ( callback , queue ) warnings . warn ( "The FedoraMessagingService class is deprecated and will be removed" " in fedora-messaging v2.0, please use FedoraMessagingServiceV2 instead." , DeprecationWarning , )
Initialize the service.