1.1.6. utils.zmq package¶
1.1.6.1. Submodules¶
1.1.6.2. radical.utils.zmq.bridge module¶
- class radical.utils.zmq.bridge.Bridge(cfg)[source]¶
Bases:
object
A bridge can be configured to have a finite lifetime: when no messages are received in timeout seconds, the bridge process will terminate.
- property addr_in¶
- property addr_out¶
- property alive¶
- property channel¶
- property name¶
- property type_in¶
- property type_out¶
- property uid¶
1.1.6.3. radical.utils.zmq.client module¶
1.1.6.4. radical.utils.zmq.pubsub module¶
- class radical.utils.zmq.pubsub.PubSub(cfg=None, channel=None)[source]¶
Bases:
Bridge
- property addr_in¶
- property addr_out¶
- property addr_pub¶
- property addr_sub¶
- property type_in¶
- property type_out¶
- class radical.utils.zmq.pubsub.Publisher(channel, url=None, log=None, prof=None, path=None)[source]¶
Bases:
object
- property channel¶
- property name¶
- property uid¶
- property url¶
1.1.6.5. radical.utils.zmq.queue module¶
- class radical.utils.zmq.queue.Getter(channel, url=None, cb=None, log=None, prof=None, path=None)[source]¶
Bases:
object
- property channel¶
- property name¶
- property uid¶
1.1.6.6. radical.utils.zmq.registry module¶
- class radical.utils.zmq.registry.Registry(url: Optional[str] = None, uid: Optional[str] = None, persistent: bool = False)[source]¶
Bases:
Server
The ru.zmq.Registry is a ZMQ service which provides a hierarchical persistent data store.
1.1.6.7. radical.utils.zmq.server module¶
1.1.6.8. radical.utils.zmq.utils module¶
- radical.utils.zmq.utils.get_channel_url(ep_type, channel=None, url=None)[source]¶
For the given endpoint type, ensure that both channel name and endpoint URL are known. If they are not, raise a ValueError exception.
For a given URL, the channel is derived as path element of that URL (leading / is stripped).
For a given channel channel name, the URL is searched in the process environment (under uppercase version of <CHANNEL>_<EPTYPE>_URL). If not found, the method will look if a config file with the name <channel>.cfg exists, and if it has a top level entry named <ep_type> (lower case).
Before returning the given or derived channel and url, the method will check if both data match (i.e. if the channel name is reflected in the URL)