timeflux.nodes.zmq


timeflux.nodes.zmq: a simple 0MQ pub/sub broker

zmq

class timeflux.nodes.zmq.Broker(address_in='tcp://127.0.0.1:5559', address_out='tcp://127.0.0.1:5560')[source]

Bases: timeflux.core.node.Node

Must run in its own graph.

Initialize frontend and backend. If used on a LAN, bind to tcp://:5559 and tcp://:5560 instead of localhost.

update()[source]

Start a blocking proxy.

class timeflux.nodes.zmq.BrokerMonitored(address_in='tcp://127.0.0.1:5559', address_out='tcp://127.0.0.1:5560', timeout=5)[source]

Bases: timeflux.core.node.Node

Run a monitored pub/sub proxy. Will shut itself down after [timeout] seconds if no data is received. Useful for unit testing and replays.

Instantiate the node.

update()[source]

Monitor proxy

class timeflux.nodes.zmq.BrokerLVC(address_in='tcp://127.0.0.1:5559', address_out='tcp://127.0.0.1:5560', timeout=1000)[source]

Bases: timeflux.core.node.Node

A monitored pub/sub broker with last value caching.

Instantiate the node.

update()[source]

Main poll loop.

class timeflux.nodes.zmq.Pub(topic, address='tcp://127.0.0.1:5559', serializer='pickle', wait=0)[source]

Bases: timeflux.core.node.Node

Helper class that provides a standard way to create an ABC using inheritance.

Create a publisher

update()[source]

Update the input and output ports.

class timeflux.nodes.zmq.Sub(topics=[''], address='tcp://127.0.0.1:5560', deserializer='pickle')[source]

Bases: timeflux.core.node.Node

Helper class that provides a standard way to create an ABC using inheritance.

Create a subscriber

update()[source]

Update the input and output ports.