def __init__(self, conf, channel, topic, callback, tag, name=None, exchange_name=None, **kwargs): options = { 'durable': conf.rabbit_durable_queues, 'queue_arguments': _get_queue_arguments(conf), 'auto_delete': False, 'exclusive': False } options.update(kwargs) #TODO exchange_name = exchange_name or rpc_amqp.get_control_exchange(conf) exchange = kombu.entity.Exchange(name=exchange_name, type='topic', durable=options['durable'], auto_delete=options['auto_delete']) super(TopicConsumer, self).__init__(channel, callback, tag, name=name or topic, exchange=exchange, routing_key=topic, **options)
def __init__(self, conf, channel, topic, **kwargs): options = { 'durable': conf.rabbit_durable_queues, 'auto_delete': False, 'exclusive': False } options.update(kwargs) exchange_name = rpc_amqp.get_control_exchange(conf) super(TopicPublisher, self).__init__(channel, exchange_name, topic, type='topic', **options)
def __init__(self, conf, channel, topic, callback, tag, name=None, exchange_name=None, **kwargs): options = { "durable": conf.rabbit_durable_queues, "queue_arguments": _get_queue_arguments(conf), "auto_delete": False, "exclusive": False, } options.update(kwargs) # TODO exchange_name = exchange_name or rpc_amqp.get_control_exchange(conf) exchange = kombu.entity.Exchange( name=exchange_name, type="topic", durable=options["durable"], auto_delete=options["auto_delete"] ) super(TopicConsumer, self).__init__( channel, callback, tag, name=name or topic, exchange=exchange, routing_key=topic, **options )
def __init__(self, conf, channel, topic, **kwargs): options = {"durable": conf.rabbit_durable_queues, "auto_delete": False, "exclusive": False} options.update(kwargs) exchange_name = rpc_amqp.get_control_exchange(conf) super(TopicPublisher, self).__init__(channel, exchange_name, topic, type="topic", **options)