""" Simple message queuing broker Same as request-reply broker but using zmq.proxy Author: Guillaume Aubert (gaubert) """ import zmq def main(): """ main method """ context = zmq.Context() # Socket facing clients frontend = context.socket(zmq.ROUTER) frontend.bind("tcp://*:5559") # Socket facing services backend = context.socket(zmq.DEALER) backend.bind("tcp://*:5560") zmq.proxy(frontend, backend) # We never get hereā€¦ frontend.close() backend.close() context.term() if __name__ == "__main__": main()