The openstack_dashboard.openstack.common.rpc.impl_kombu ModuleΒΆ

class openstack_dashboard.openstack.common.rpc.impl_kombu.Connection(conf, server_params=None)[source]

Bases: object

Connection object.

Connection.cancel_consumer_thread()[source]

Cancel a consumer thread.

Connection.close()[source]

Close/release this connection.

Connection.consume(limit=None)[source]

Consume from all queues/consumers.

Connection.consume_in_thread()[source]

Consumer from all queues/consumers in a greenthread.

Connection.create_consumer(topic, proxy, fanout=False)[source]

Create a consumer that calls a method in a proxy object.

Connection.create_worker(topic, proxy, pool_name)[source]

Create a worker that calls a method in a proxy object.

Connection.declare_consumer(consumer_cls, topic, callback)[source]

Create a Consumer using the class that was passed in and add it to our list of consumers

Connection.declare_direct_consumer(topic, callback)[source]

Create a ‘direct’ queue. In nova’s use, this is generally a msg_id queue used for responses for call/multicall

Connection.declare_fanout_consumer(topic, callback)[source]

Create a ‘fanout’ consumer.

Connection.declare_topic_consumer(topic, callback=None, queue_name=None, exchange_name=None)[source]

Create a ‘topic’ consumer.

Connection.direct_send(msg_id, msg)[source]

Send a ‘direct’ message.

Connection.ensure(error_callback, method, *args, **kwargs)[source]
Connection.fanout_send(topic, msg)[source]

Send a ‘fanout’ message.

Connection.get_channel()[source]

Convenience call for bin/clear_rabbit_queues.

Connection.iterconsume(limit=None, timeout=None)[source]

Return an iterator that will consume from all queues/consumers.

Connection.join_consumer_pool(callback, pool_name, topic, exchange_name=None)[source]

Register as a member of a group of consumers for a given topic from the specified exchange.

Exactly one member of a given pool will receive each message.

A message will be delivered to multiple pools, if more than one is created.

Connection.notify_send(topic, msg, **kwargs)[source]

Send a notify message on a topic.

Connection.pool = None
Connection.publisher_send(cls, topic, msg, timeout=None, **kwargs)[source]

Send to a publisher based on the publisher class.

Connection.reconnect()[source]

Handles reconnecting and re-establishing queues. Will retry up to self.max_retries number of times. self.max_retries = 0 means to retry forever. Sleep between tries, starting at self.interval_start seconds, backing off self.interval_stepping number of seconds each attempt.

Connection.reset()[source]

Reset a connection so it can be used again.

Connection.topic_send(topic, msg, timeout=None)[source]

Send a ‘topic’ message.

Connection.wait_on_proxy_callbacks()[source]

Wait for all proxy callback threads to exit.

class openstack_dashboard.openstack.common.rpc.impl_kombu.ConsumerBase(channel, callback, tag, **kwargs)[source]

Bases: object

Consumer base class.

ConsumerBase.cancel()[source]

Cancel the consuming from the queue, if it has started.

ConsumerBase.consume(*args, **kwargs)[source]

Actually declare the consumer on the amqp channel. This will start the flow of messages from the queue. Using the Connection.iterconsume() iterator will process the messages, calling the appropriate callback.

If a callback is specified in kwargs, use that. Otherwise, use the callback passed during __init__()

If kwargs[‘nowait’] is True, then this call will block until a message is read.

Messages will automatically be acked if the callback doesn’t raise an exception

ConsumerBase.reconnect(channel)[source]

Re-declare the queue after a rabbit reconnect.

class openstack_dashboard.openstack.common.rpc.impl_kombu.DirectConsumer(conf, channel, msg_id, callback, tag, **kwargs)[source]

Bases: openstack_dashboard.openstack.common.rpc.impl_kombu.ConsumerBase

Queue/consumer class for ‘direct’.

class openstack_dashboard.openstack.common.rpc.impl_kombu.DirectPublisher(conf, channel, msg_id, **kwargs)[source]

Bases: openstack_dashboard.openstack.common.rpc.impl_kombu.Publisher

Publisher class for ‘direct’.

class openstack_dashboard.openstack.common.rpc.impl_kombu.FanoutConsumer(conf, channel, topic, callback, tag, **kwargs)[source]

Bases: openstack_dashboard.openstack.common.rpc.impl_kombu.ConsumerBase

Consumer class for ‘fanout’.

class openstack_dashboard.openstack.common.rpc.impl_kombu.FanoutPublisher(conf, channel, topic, **kwargs)[source]

Bases: openstack_dashboard.openstack.common.rpc.impl_kombu.Publisher

Publisher class for ‘fanout’.

class openstack_dashboard.openstack.common.rpc.impl_kombu.NotifyPublisher(conf, channel, topic, **kwargs)[source]

Bases: openstack_dashboard.openstack.common.rpc.impl_kombu.TopicPublisher

Publisher class for ‘notify’.

NotifyPublisher.reconnect(channel)[source]
class openstack_dashboard.openstack.common.rpc.impl_kombu.Publisher(channel, exchange_name, routing_key, **kwargs)[source]

Bases: object

Base Publisher class.

Publisher.reconnect(channel)[source]

Re-establish the Producer after a rabbit reconnection.

Publisher.send(msg, timeout=None)[source]

Send a message.

class openstack_dashboard.openstack.common.rpc.impl_kombu.TopicConsumer(conf, channel, topic, callback, tag, name=None, exchange_name=None, **kwargs)[source]

Bases: openstack_dashboard.openstack.common.rpc.impl_kombu.ConsumerBase

Consumer class for ‘topic’.

class openstack_dashboard.openstack.common.rpc.impl_kombu.TopicPublisher(conf, channel, topic, **kwargs)[source]

Bases: openstack_dashboard.openstack.common.rpc.impl_kombu.Publisher

Publisher class for ‘topic’.

openstack_dashboard.openstack.common.rpc.impl_kombu.call(conf, context, topic, msg, timeout=None)[source]

Sends a message on a topic and wait for a response.

openstack_dashboard.openstack.common.rpc.impl_kombu.cast(conf, context, topic, msg)[source]

Sends a message on a topic without waiting for a response.

openstack_dashboard.openstack.common.rpc.impl_kombu.cast_to_server(conf, context, server_params, topic, msg)[source]

Sends a message on a topic to a specific server.

openstack_dashboard.openstack.common.rpc.impl_kombu.cleanup()[source]
openstack_dashboard.openstack.common.rpc.impl_kombu.create_connection(conf, new=True)[source]

Create a connection.

openstack_dashboard.openstack.common.rpc.impl_kombu.fanout_cast(conf, context, topic, msg)[source]

Sends a message on a fanout exchange without waiting for a response.

openstack_dashboard.openstack.common.rpc.impl_kombu.fanout_cast_to_server(conf, context, server_params, topic, msg)[source]

Sends a message on a fanout exchange to a specific server.

openstack_dashboard.openstack.common.rpc.impl_kombu.multicall(conf, context, topic, msg, timeout=None)[source]

Make a call that returns multiple times.

openstack_dashboard.openstack.common.rpc.impl_kombu.notify(conf, context, topic, msg, envelope)[source]

Sends a notification event on a topic.

Previous topic

The openstack_dashboard.openstack.common.rpc.impl_zmq Module

Next topic

The openstack_dashboard.openstack.common.rpc.common Module

This Page