How to use the txzmq.ZmqPushConnection function in txZMQ

To help you get started, we’ve selected a few txZMQ examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gtaylor / dockerized-image-crawler / crawler / crawler_worker / services / zeromq.py View on Github external
def startService(self):
        factory = ZmqFactory()
        log.msg("Delegator connecting to repeater: %s" % ZMQ_REPEATER)
        endpoint = ZmqEndpoint('connect', ZMQ_REPEATER)
        self.conn = ZmqPushConnection(factory, endpoint)
github gtaylor / dockerized-image-crawler / crawler / webapi_service / services / zeromq.py View on Github external
def startService(self):
        factory = ZmqFactory()
        bind_point = 'tcp://0.0.0.0:8050'
        log.msg("Broadcaster binding on: %s" % bind_point)
        endpoint = ZmqEndpoint('bind', bind_point)
        self.conn = ZmqPushConnection(factory, endpoint)
github leapcode / leap_pycommon / src / leap / common / events / txclient.py View on Github external
def __init__(self, emit_addr=EMIT_ADDR, reg_addr=REG_ADDR,
            path_prefix=None):
        """
        Initialize the events server.
        """
        TxZmqClientComponent.__init__(self, path_prefix=path_prefix)
        EventsClient.__init__(self, emit_addr, reg_addr)
        # connect SUB first, otherwise we might miss some event sent from this
        # same client
        self._sub = self._zmq_connect(txzmq.ZmqSubConnection, reg_addr)
        self._sub.gotMessage = self._gotMessage
        self._push = self._zmq_connect(txzmq.ZmqPushConnection, emit_addr)