Bases: object
Return a version of this context with admin flag set.
Bases: object
A connection, returned by rpc.create_connection().
This class represents a connection to the message bus used for rpc. An instance of this class should never be created by users of the rpc API. Use rpc.create_connection() instead.
Close the connection.
This method must be called when the connection will no longer be used. It will ensure that any resources associated with the connection, such as a network connection, and cleaned up.
Spawn a thread to handle incoming messages.
Spawn a thread that will be responsible for handling all incoming messages for consumers that were set up on this connection.
Message dispatching inside of this is expected to be implemented in a non-blocking manner. An example implementation would be having this thread pull messages in for all of the consumers, but utilize a thread pool for dispatching the messages to the proxy objects.
Create a consumer on this connection.
A consumer is associated with a message queue on the backend message bus. The consumer will read messages from the queue, unpack them, and dispatch them to the proxy object. The contents of the message pulled off of the queue will determine which method gets called on the proxy object.
Parameters: |
|
---|
Create a worker on this connection.
A worker is like a regular consumer of messages directed to a topic, except that it is part of a set of such consumers (the “pool”) which may run in parallel. Every pool of workers will receive a given message, but only one worker in the pool will be asked to process it. Load is distributed across the members of the pool in round-robin fashion.
Parameters: |
|
---|
Bases: nova.openstack.common.rpc.common.RPCException
Bases: exceptions.Exception
Bases: nova.openstack.common.rpc.common.RPCException
Signifies that a remote class has raised an exception.
Contains a string representation of the type of the original exception, the value of the original exception, and the traceback. These are sent to the parent as a joined string so printing the exception contains all of the relevant info.
Bases: nova.openstack.common.rpc.common.RPCException
Signifies that a timeout has occurred.
This exception is raised if the rpc_response_timeout is reached while waiting for a response from the remote side.
Bases: nova.openstack.common.rpc.common.RPCException
Prepares exception data to be sent over rpc.
Failure_info should be a sys.exc_info() tuple.