Python 3.6 ZeroMQ (PyZMQ) asyncio pub sub Hello World
问题 I've just started with ZeroMQ and I'm trying to get a Hello World to work with PyZMQ and asyncio in Python 3.6. I'm trying to de-couple the functionality of a module with the pub/sub code, hence the following class setup: Edit 1 : Minimized example Edit 2 : Included solution, see answer down for how. import asyncio import zmq.asyncio from zmq.asyncio import Context # manages message flow between publishers and subscribers class HelloWorldMessage: def __init__(self, url='127.0.0.1', port='5555