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(self)[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.

Create instance and initialize the logger.

update(self)[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.

Create instance and initialize the logger.

update(self)[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

Create a publisher

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

Bases: timeflux.core.node.Node

Create a subscriber

update(self)[source]