The nova.openstack.common.rpc.impl_zmq Module

class Connection(conf)

Bases: nova.openstack.common.rpc.common.Connection

Manages connections and threads.

close()
consume_in_thread()
create_consumer(topic, proxy, fanout=False)
wait()
class ConsumerBase

Bases: object

Base Consumer.

classmethod normalize_reply(result, replies)
process(proxy, ctx, data)
class InternalContext(proxy)

Bases: object

Used by ConsumerBase as a private context for - methods.

reply(ctx, proxy, msg_id=None, context=None, topic=None, msg=None)

Reply to a casted call.

class RpcContext(**kwargs)

Bases: nova.openstack.common.rpc.common.CommonRpcContext

Context that supports replying to a rpc.call.

deepcopy()
classmethod marshal(ctx)
reply(reply=None, failure=None, ending=False)
classmethod unmarshal(data)
class ZmqBaseReactor(conf)

Bases: nova.openstack.common.rpc.impl_zmq.ConsumerBase

A consumer class implementing a centralized casting broker (PULL-PUSH) for RoundRobin requests.

close()
consume_in_thread()
register(proxy, in_addr, zmq_type_in, out_addr=None, zmq_type_out=None, in_bind=True, out_bind=True, subscribe=None)
wait()
class ZmqClient(addr, socket_type=None, bind=False)

Bases: object

Client for ZMQ sockets.

cast(msg_id, topic, data, envelope=False)
close()
class ZmqProxy(conf)

Bases: nova.openstack.common.rpc.impl_zmq.ZmqBaseReactor

A consumer class implementing a topic-based proxy, forwarding to IPC sockets.

consume(sock)
consume_in_thread()

Runs the ZmqProxy service

class ZmqReactor(conf)

Bases: nova.openstack.common.rpc.impl_zmq.ZmqBaseReactor

A consumer class implementing a consumer for messages. Can also be used as a 1:1 proxy

consume(sock)
class ZmqSocket(addr, zmq_type, bind=True, subscribe=None)

Bases: object

A tiny wrapper around ZeroMQ to simplify the send/recv protocol and connection management.

Can be used as a Context (supports the ‘with’ statement).

close()
recv()
send(data)
socket_s()

Get socket type as string.

subscribe(msg_filter)

Subscribe.

unsubscribe(msg_filter)

Unsubscribe.

call(conf, *args, **kwargs)

Send a message, expect a response.

cast(conf, *args, **kwargs)

Send a message expecting no reply.

cleanup()

Clean up resources in use by implementation.

create_connection(conf, new=True)
fanout_cast(conf, context, topic, msg, **kwargs)

Send a message to all listening and expect no reply.

multicall(conf, *args, **kwargs)

Multiple calls.

notify(conf, context, topic, msg, envelope)

Send notification event. Notifications are sent to topic-priority. This differs from the AMQP drivers which send to topic.priority.

unflatten_envelope(packenv)

Unflattens the RPC envelope. Takes a list and returns a dictionary. i.e. [1,2,3,4] => {1: 2, 3: 4}

Previous topic

The nova.openstack.common.rpc.impl_qpid Module

Next topic

The nova.openstack.common.rpc.matchmaker Module

This Page