The heat.openstack.common.rpc.impl_qpid Module

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

Bases: object

Connection object.

cancel_consumer_thread()[source]

Cancel a consumer thread

close()[source]

Close/release this connection

connection_create(broker)[source]
consume(limit=None)[source]

Consume from all queues/consumers

consume_in_thread()[source]

Consumer from all queues/consumers in a greenthread

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

Create a consumer that calls a method in a proxy object

create_worker(topic, proxy, pool_name)[source]

Create a worker that calls a method in a proxy object

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

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

declare_fanout_consumer(topic, callback)[source]

Create a ‘fanout’ consumer

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

Create a ‘topic’ consumer.

direct_send(msg_id, msg)[source]

Send a ‘direct’ message

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

Send a ‘fanout’ message

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

Return an iterator that will consume from all queues/consumers

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.

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

Send a notify message on a topic

pool = None
publisher_send(cls, topic, msg)[source]

Send to a publisher based on the publisher class

reconnect()[source]

Handles reconnecting and re-establishing sessions and queues

reset()[source]

Reset a connection so it can be used again

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

Send a ‘topic’ message

wait_on_proxy_callbacks()[source]

Wait for all proxy callback threads to exit.

class heat.openstack.common.rpc.impl_qpid.ConsumerBase(session, callback, node_name, node_opts, link_name, link_opts)[source]

Bases: object

Consumer base class.

consume()[source]

Fetch the message and pass it to the callback object

get_receiver()[source]
reconnect(session)[source]

Re-declare the receiver after a qpid reconnect

class heat.openstack.common.rpc.impl_qpid.DirectConsumer(conf, session, msg_id, callback)[source]

Bases: heat.openstack.common.rpc.impl_qpid.ConsumerBase

Queue/consumer class for ‘direct’

class heat.openstack.common.rpc.impl_qpid.DirectPublisher(conf, session, msg_id)[source]

Bases: heat.openstack.common.rpc.impl_qpid.Publisher

Publisher class for ‘direct’

class heat.openstack.common.rpc.impl_qpid.FanoutConsumer(conf, session, topic, callback)[source]

Bases: heat.openstack.common.rpc.impl_qpid.ConsumerBase

Consumer class for ‘fanout’

class heat.openstack.common.rpc.impl_qpid.FanoutPublisher(conf, session, topic)[source]

Bases: heat.openstack.common.rpc.impl_qpid.Publisher

Publisher class for ‘fanout’

class heat.openstack.common.rpc.impl_qpid.NotifyPublisher(conf, session, topic)[source]

Bases: heat.openstack.common.rpc.impl_qpid.Publisher

Publisher class for notifications

class heat.openstack.common.rpc.impl_qpid.Publisher(session, node_name, node_opts=None)[source]

Bases: object

Base Publisher class

reconnect(session)[source]

Re-establish the Sender after a reconnection

send(msg)[source]

Send a message

class heat.openstack.common.rpc.impl_qpid.TopicConsumer(conf, session, topic, callback, name=None, exchange_name=None)[source]

Bases: heat.openstack.common.rpc.impl_qpid.ConsumerBase

Consumer class for ‘topic’

class heat.openstack.common.rpc.impl_qpid.TopicPublisher(conf, session, topic)[source]

Bases: heat.openstack.common.rpc.impl_qpid.Publisher

Publisher class for ‘topic’

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

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

heat.openstack.common.rpc.impl_qpid.cast(conf, context, topic, msg)[source]

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

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

Sends a message on a topic to a specific server.

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

Create a connection

heat.openstack.common.rpc.impl_qpid.fanout_cast(conf, context, topic, msg)[source]

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

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

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

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

Make a call that returns multiple times.

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

Sends a notification event on a topic.

This Page