예제 #1
0
    def __init__(self,
                 conf,
                 url,
                 default_exchange=None,
                 allowed_remote_exmods=None):

        deprecate(
            "The pika driver is no longer maintained. It has been"
            " deprecated",
            message="It is recommended that all users of the pika driver"
            " transition to using the rabbit driver.",
            version="pike",
            removal_version="rocky")

        opt_group = cfg.OptGroup(name='oslo_messaging_pika',
                                 title='Pika driver options')
        conf.register_group(opt_group)
        conf.register_opts(pika_drv_conn_factory.pika_opts, group=opt_group)
        conf.register_opts(pika_pool_opts, group=opt_group)
        conf.register_opts(message_opts, group=opt_group)
        conf.register_opts(rpc_opts, group=opt_group)
        conf.register_opts(notification_opts, group=opt_group)
        conf = common.ConfigOptsProxy(conf, url, opt_group.name)

        self._pika_engine = pika_drv_engine.PikaEngine(conf, url,
                                                       default_exchange,
                                                       allowed_remote_exmods)
        self._reply_listener = pika_drv_lstnr.RpcReplyPikaListener(
            self._pika_engine)
        super(PikaDriver, self).__init__(conf, url, default_exchange,
                                         allowed_remote_exmods)
예제 #2
0
    def __init__(self,
                 conf,
                 url,
                 default_exchange=None,
                 allowed_remote_exmods=None):
        opt_group = cfg.OptGroup(name='oslo_messaging_pika',
                                 title='Pika driver options')
        conf.register_group(opt_group)
        conf.register_opts(pika_opts, group=opt_group)
        conf.register_opts(pika_pool_opts, group=opt_group)
        conf.register_opts(rpc_opts, group=opt_group)
        conf.register_opts(notification_opts, group=opt_group)

        self._pika_engine = pika_drv_engine.PikaEngine(conf, url,
                                                       default_exchange,
                                                       allowed_remote_exmods)
        self._reply_listener = pika_drv_lstnr.RpcReplyPikaListener(
            self._pika_engine)
        super(PikaDriver, self).__init__(conf, url, default_exchange,
                                         allowed_remote_exmods)