ZMQBroker

class Cauldron.zmq.broker.ZMQBroker(name, address, pub_address, sub_address, mon_address, context=None, timeout=1.0)[source] [edit on github]

Bases: threading.Thread

A broker object for handling ZMQ Messaging patterns

Methods Summary

check([config, timeout, ctx, address]) Check for the existence of a router at the configured address.
cleanup(socket) docstring for cleanup
close() Close thread-local sockets.
connect(address[, mode]) Connect the frontend and backend sockets.
daemon([config, daemon]) Serve in a process.
from_config(config[, name]) Make a new item from a configuration.
get_service(service) Try to get a service.
prepare() Thread local way to prepare connections.
respond() Respond to a single message on each socket.
respond_inquiry(message, socket) Respond to an inquiry.
run() Run method for threads.
serve(config[, name]) Make a broker which serves.
setup([config, timeout]) Ensure a broker is set up to start.
stop() Stop the responder.
thread([config, daemon]) Serve in a thread.

Methods Documentation

classmethod check(config=None, timeout=2.0, ctx=None, address=None)[source] [edit on github]

Check for the existence of a router at the configured address.

cleanup(socket)[source] [edit on github]

docstring for cleanup

close()[source] [edit on github]

Close thread-local sockets.

connect(address, mode='ROUTER')[source] [edit on github]

Connect the frontend and backend sockets.

classmethod daemon(config=None, daemon=True)[source] [edit on github]

Serve in a process.

classmethod from_config(config, name='ConfiguredBroker')[source] [edit on github]

Make a new item from a configuration.

get_service(service)[source] [edit on github]

Try to get a service.

prepare()[source] [edit on github]

Thread local way to prepare connections.

respond()[source] [edit on github]

Respond to a single message on each socket.

respond_inquiry(message, socket)[source] [edit on github]

Respond to an inquiry.

run()[source] [edit on github]

Run method for threads.

classmethod serve(config, name='ServerBroker')[source] [edit on github]

Make a broker which serves.

classmethod setup(config=None, timeout=2.0)[source] [edit on github]

Ensure a broker is set up to start.

stop()[source] [edit on github]

Stop the responder.

classmethod thread(config=None, daemon=True)[source] [edit on github]

Serve in a thread.